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/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
// getting-started.js from http://mongoosejs.com/docs/index.html | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', console.error.bind(console, "connection error:")); | |
db.once('open', function callback () { | |
// yay! |
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
// ... requires elided... | |
var UserSchema = new Schema({ | |
name: String, | |
email: String, | |
username: { | |
type: String, | |
unique: true | |
}, | |
provider: String, | |
hashed_password: String, |
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
import tempfile | |
import qumulo.lib.auth | |
import qumulo.lib.request | |
import qumulo.rest.fs as fs | |
host = 'yourhost' | |
port = 8000 | |
user = 'user' | |
passwd = 'passwd' |
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
import sys | |
import tempfile | |
import time | |
import qumulo.lib.auth | |
import qumulo.lib.request | |
import qumulo.rest.fs as fs | |
host = 'myhost' | |
port = 8000 |
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
import sys | |
import tempfile | |
import time | |
import qumulo.lib.auth | |
import qumulo.lib.request | |
import qumulo.rest.fs as fs | |
host = 'yourhostname' | |
port = 8000 |
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
''' | |
walk a file tree from specified starting point, unzip any zip files encountered in the | |
directory where zip file was found, and then delete the zip file after succesfully | |
unzipping | |
''' | |
import os | |
import zipfile | |
folder_root = '/Users/me/Pictures' | |
suffix = ".zip" |
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
#EXTM3U | |
#EXTINF:-1,BBC - Radio 1 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_one/format/pls.pls | |
#EXTINF:-1,BBC - Radio 2 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_two/format/pls.pls | |
#EXTINF:-1,BBC - Radio 3 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_three/format/pls.pls | |
#EXTINF:-1,BBC - Radio 4 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_fourfm/format/pls.pls | |
#EXTINF:-1,BBC - Radio 4 LW |