This file contains 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
process.stdin.resume() | |
process.stdin.setEncoding('ascii') | |
let input = '' | |
const lex = 'sxocqnmwpfyheljrdgui' | |
const foo = 'udxsmpf' | |
const numbers = [] | |
const lexicalMap = {} |
This file contains 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
'.source.js': | |
'Models Imports': | |
'prefix': 'modelimport' | |
'body': 'const $1 = require(path.resolve("models/$1"))' | |
'Return Error': | |
'prefix': 'return-error' | |
'body': 'if (error) { \n console.log($1, error) \n return res.status(500).json({ error: { message: $1 } })}' |
This file contains 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
docker stop proxy && docker rm proxy && docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart=always --name proxy --network proxy jwilder/nginx-proxy |
This file contains 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
curl -u $token:x-oauth-basic -s https://api.github.com/orgs/$organization/repos\?page\=1\&per_page=100 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
This file contains 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
find . -maxdepth 3 -name .git -type d | rev | cut -c 6- | rev | xargs -I {} git -C {} pull |
This file contains 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
find . -mindepth 1 -maxdepth 1 -type d | wc -l |
This file contains 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 path = require("path"); | |
const paths = { | |
assets: path.resolve(__dirname, "assets"), | |
src: path.resolve(__dirname, "src"), | |
styles: path.resolve(__dirname, "styles") | |
}; | |
module.exports = function(api) { | |
api.cache(true); |
This file contains 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 main | |
import "sync/atomic" | |
func sum(counter *int32, i int32) *int32 { | |
atomic.AddInt32(counter, i) | |
return counter | |
} | |
func main() { |
This file contains 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
//This function counts the occurences | |
function findMostUsedWords(text) { | |
const matches = text.reduce((a, b) => { | |
a[b] = (a[b] + 1 || 1) | |
return a | |
}, {}) | |
const max = Math.max(...Object.values(matches)) | |
return Object.keys(matches).filter((word) => matches[word] === max) | |
} | |
// This function removes the excluded words |