This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "tonic-stream-wrapper" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tokio = { version = "1", features = ["full"] } | |
tokio-stream = { version = "0.1", features = ["sync"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { GetState, PartialState, SetState, State } from "zustand"; | |
const noop = (..._: unknown[]): void => { | |
/* noop */ | |
}; | |
export type Setter<T extends State> = ( | |
s: Partial<T> | ((prev: T) => Partial<T>), | |
replace?: boolean | |
) => void; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use google_pubsub1::{api::AcknowledgeRequest, Pubsub}; | |
use std::fs::File; | |
use std::io::BufReader; | |
use yup_oauth2::ServiceAccountKey; | |
static SUBSCRIPTION_PATH: &'static str = | |
"projects/PROJECT_ID/subscriptions/SUBSCRIPTION"; | |
static ACCOUNT_KEY = &'static str = "YOUR_ACCOUNT_KEY.json"; | |
#[tokio::main] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 | |
-OEChem-01172103382D | |
19 19 0 1 0 0 0 0 0999 V2000 | |
5.1350 1.3450 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | |
6.8671 0.3450 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | |
2.5369 -0.1550 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | |
3.4030 1.3450 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | |
5.1350 0.3450 0.0000 C 0 0 3 0 0 0 0 0 0 0 0 0 | |
6.0010 -0.1550 0.0000 C 0 0 3 0 0 0 0 0 0 0 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
CacheModuleOptions, | |
CacheOptionsFactory, | |
Injectable, | |
} from '@nestjs/common'; | |
import { LoggerService } from '@src/common/logger.service'; | |
import { ConfigOptions, ConfigService } from '@src/config/config.service'; | |
import * as redisCacheStore from 'cache-manager-redis-store'; | |
@Injectable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const decorateLink = (destinationUrl) => { | |
if (ga !== undefined && typeof ga.getAll === 'function') { | |
const trackers = ga.getAll(); | |
if (trackers.length > 0) { | |
const linker = new window.gaplugins.Linker(trackers[0]); | |
return linker.decorate(destinationUrl); | |
} | |
} | |
return destinationUrl; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const withScrolllock = (WrappedComponent) => { | |
return class ScrolllockComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
this.y = null; | |
this.ref = null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { TimelineLite, TweenLite } from 'gsap'; | |
const asGsapped = (WrappedComponent) => { | |
return class GsappedComponent extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var callrailGoogleMaps = { | |
getNumbers: function() { | |
var self = this; | |
window.CallTrk.getSwapNumbers(null, function(nums) { | |
self.swapNumbers(nums); | |
}); | |
}, | |
getMapPoints: function() { | |
if (mapping !== undefined) { | |
return mapping.mapPoint.alllocmap.points; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import sys | |
import httplib2 | |
import re | |
import json | |
from googleapiclient.discovery import build | |
from oauth2client import client | |
from oauth2client import file | |
from oauth2client import tools |
NewerOlder