Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage | |
cd ~/.atom/packages/mypackage | |
apm login | |
apm develop mypackage | |
cd ~/github/mypackage | |
sudo chown -R username:wheel . | |
git commit -a -m 'checking everything in' | |
apm publish --tag v2.5.0 minor |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
var name = $(this.el).find("input[name='connname']").val(); | |
var path = $(this.el).find("select[name='csvpath']").val(); | |
var enabled = false; | |
if(schema.has.been.created){ | |
var mondrianschema = $(this.el).find(".schemaselect").val(); | |
enabled = true; | |
} | |
var c = "type=OLAP\n"+ | |
"name="+name+"\n"+ | |
"driver=mondrian.olap4j.MondrianOlap4jDriver\n"+ |
// encode(decode) html text into html entity | |
var decodeHtmlEntity = function(str) { | |
return str.replace(/&#(\d+);/g, function(match, dec) { | |
return String.fromCharCode(dec); | |
}); | |
}; | |
var encodeHtmlEntity = function(str) { | |
var buf = []; | |
for (var i=str.length-1;i>=0;i--) { |
#!/bin/bash | |
for fname in `ls *.jpg` | |
do | |
mv -nv ${fname} $RANDOM.jpg | |
done |
// ==UserScript== | |
// @name Google Translate Tooltip | |
// @namespace steely.wing | |
// @version 1.10 | |
// @description Translates selected text into a tooltip. | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @copyright 2014, Wing Leong (http://steelywing.iblogger.org/) | |
// @include * | |
// @require http://code.jquery.com/jquery-2.1.0.min.js | |
// @grant GM_getValue |
#!/usr/bin/env python3 | |
# Get your files that Gmail block. Warning message: | |
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled." | |
# Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/ | |
# Go to your emails, click the arrow button in the top right, "Show original", then "Download Original". Move the file to the same directory as this script. | |
import email | |
import sys | |
import os |
// ES7, async/await | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
(async () => { | |
console.log('a'); | |
await sleep(1000); | |
console.log('b'); | |
})() |