ssh-keygen
ssh-copy-id id@server
Deploy all files, except node_modules
`rsync -rav -e ssh --include '*/' --exclude='node_modules'
server:./directory/ \
.
| alice.welcome((ctx) => { | |
| ctx.confirm({ | |
| reply: '18 есть?', | |
| onYes: (ctx) => ctx.reply('добро пожаловать'), | |
| onNo: (ctx) => ctx.reply('в другой раз'), | |
| }) | |
| }) | |
| function aliceConfirmMiddleware() { | |
| const store = new Map() |
| // This is blockchain implementaion | |
| // Be careful — it doesn't work as expected actually :) | |
| const CryptoJS = require('crypto-js') | |
| class Block { | |
| constructor(index, timestamp, data, previousHash = '0') { | |
| this.index = index | |
| this.previousHash = previousHash | |
| this.timestamp = timestamp | |
| this.data = data |
| ((name, context = window, func) => { context[name] = func() }) | |
| ('CpuMeter', this, () => { | |
| const isEmptyObject = object => Object.keys(object).length === 0 | |
| const getProcessorUsage = (usage, oldUsage) => | |
| Math.floor((usage.kernel + usage.user - oldUsage.kernel - oldUsage.user) / (usage.total - oldUsage.total) * 100) | |
| class CpuMeter { | |
| constructor() { | |
| if (!chrome || !chrome.system || !chrome.system.cpu) { | |
| throw new Error(`No access to chrome.system.cpu! |
| const GitHubApi = require('github') | |
| const github = new GitHubApi({ | |
| version: '3.0.0', | |
| debug: false, | |
| protocol: 'https', | |
| host: 'api.github.com', | |
| pathPrefix: '', | |
| timeout: 5000, | |
| headers: { | |
| 'user-agent': 'GitHub Commits Abuser' // GitHub is happy with a unique user agent |
| const merge = (...args) => Object.assign({}, ...args) | |
| const arrayFromObject = obj => Object.keys(obj).map(key => obj[key]) | |
| const getLastTreeIndex = tree => parseInt(Object.keys(tree).pop(), 10) | |
| const getNextTreeIndex = tree => getLastTreeIndex(tree) + 1 | |
| const getNodeParentIndex = (tree, {value}) => { | |
| let currentNode = tree[0] | |
| let currentIndex = 0 | |
| while (currentNode) { | |
| if (value >= currentNode.value) { | |
| currentNode = tree[currentNode.right] |
| from sys import exit | |
| game = {} | |
| game_inverted = {} | |
| game_diagonal = [] | |
| for i in range(0, 10): | |
| game[i] = [] | |
| game_inverted[i] = [] |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <div class='container'> | |
| Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
| tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
| quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo |
| # MIT — fletcherist | |
| # brew tap caskroom/versions | |
| git config --global user.name "fletcherist" | |
| # Saving screenshots to the folder in ~/screenshots | |
| mkdir ~/screenshots | |
| defaults write com.apple.screencapture location ~/screenshots | |
| killall SystemUIServer |
| #!/bin/bash | |
| dus () { | |
| size=0 | |
| # checking whether the dir argument provided | |
| if [ "$1" != "" ]; then | |
| sub_dir="/$1" | |
| else | |
| sub_dir="" | |
| fi | |
| # iterating over all files in all subdirectories |