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
#!/usr/bin/python | |
import os.path as path,os,json, time | |
# Get path to temporary files for scripts directory | |
tmpDir = path.join(path.dirname(path.realpath(__file__)), "tmp") | |
class File: | |
def __init__(self, name, path, creationTime): | |
self.name = name | |
self.path = path |
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
/* | |
Hot Session Middleware | |
A hot session only exists on the server, we track it and expire it. It is cookie-less, | |
however the client needs to keep sending their token. It's basically a cookie without | |
cookies. | |
TODO This is not distributed, it can only be run on a single server, and a server restart | |
will cause all sessions to disappear. |
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
#!/bin/bash | |
git checkout -b $1 | |
git push origin $1 | |
hub pull-request | |
read -p "back to master? <y/N> " prompt | |
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] | |
then | |
git fetch | |
git checkout origin/master |
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
async function add(x:number,y:number):Promise<number>{ | |
return x + y | |
} | |
const a = [1,2,3,4,5] | |
function PARALLEL(){ | |
return Promise.all(a.map((v) => add(v,1))) | |
} |
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
#!/bin/bash | |
ifconfig | grep "br-" | sed s/:.*// | xargs -I interface ip link set interface down | |
brctl show | grep "br-" | sed s/\s*8000.*// | xargs -I interface brctl delbr interface |
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
Privacy Policy of Ultimate Miner | |
In order to receive information about your Personal Data, the purposes and the parties the Data is shared with, contact the Owner. | |
Data Controller and Owner | |
Types of Data collected | |
The owner does not provide a list of Personal Data types collected. | |
Other Personal Data collected may be described in other sections of this privacy policy or by dedicated explanation text contextually with the Data collection. | |
The Personal Data may be freely provided by the User, or collected automatically when using this Application. | |
Any use of Cookies - or of other tracking tools - by this Application or by the owners of third party services used by this Application, unless stated otherwise, serves to identify Users and remember their preferences, for the sole purpose of providing the service required by the User. | |
Failure to provide certain Personal Data may make it impossible for this Application to provide its services. | |
Users are responsible for any Personal Data of third parties obtained, publ |
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
// @flow | |
export const serialResolve = (functionsReturningPromises: Array<() => Promise<any>>, parallelTasks: number) => new Promise((resolve, reject) => { | |
let tasksStarted = 0; | |
// Create empty results array | |
const results = Array.from(functionsReturningPromises, () => null); | |
const totalFunctions = functionsReturningPromises.length; | |
// When a promise completes, set the correct results index and start any additional tasks | |
let completedPromises = 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
// @flow | |
/* | |
Overrides the behavior of <a /> tags for all children. | |
Use it in your App.js to make it easier for your single page web application to route without reloading, e.g. | |
// App.js | |
class App extends Component { | |
render() { | |
return <LinkOverride onClickLink={(url) => { dispatch({type: 'PUSH_ROUTE', url}) }}> |
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
set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
let &packpath=&runtimepath | |
source ~/.vimrc | |
call plug#begin("~/.vim/plugged") | |
" Plugin Section | |
Plug 'dracula/vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' |
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
set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
let &packpath=&runtimepath | |
source ~/.vimrc | |
call plug#begin("~/.vim/plugged") | |
" Plugin Section | |
Plug 'dracula/vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' |