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
<!DOCTYPE html> | |
<html> | |
<head><title>SOUND</title></head> | |
<body> | |
<div>Frequence: <span id="frequency"></span></div> | |
<script type="text/javascript"> | |
var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
var oscillatorNode = audioCtx.createOscillator(); | |
var gainNode = audioCtx.createGain(); |
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 | |
SENDGRID_API_KEY="" | |
EMAIL_TO="" | |
FROM_EMAIL="" | |
FROM_NAME="" | |
SUBJECT="" | |
bodyHTML="<p>Email body goes here</p>" |
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 lib_net = require("net"); | |
var lib_chalk = require("chalk"); | |
var clients = {}; | |
var lastId = -1; | |
function cleanInput(data) { | |
return data.toString().replace(/(\r\n|\n|\r)/gm,""); | |
} |
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
[ | |
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} }, | |
{ "keys": ["alt+shift+o"], "command": "run_macro_file", "args": {"file": "Packages/User/output.sublime-macro"} }, | |
{ "keys": ["alt+shift+c"], "command": "run_macro_file", "args": {"file": "Packages/User/console.sublime-macro"} }, | |
{ "keys": ["ctrl+shift+t"], "command": "open_recent_file", "args": {"index": 0 } } | |
] |
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/sh | |
# Use git to push to deploy (aka git push to prod) | |
# Use 'git push remote master' to push to deploy | |
# This script only deploys on pushes to master. | |
# | |
# HOWTO: | |
# On your server to deploy, create a bare git directory | |
# (somewhere like /var/git/<gitProject>) | |
# Your depoly directory (like /var/www) should be somewhere other than your git repo. |
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 check(resolved) { | |
console.log(resolved); | |
var tag = resolved.split('/').pop(-1); | |
var latest = tag.slice(1); | |
var current = atom.getVersion(); | |
if (latest != current) { | |
atom.notifications.addInfo('new version available: ' + resolved); | |
// TODO detect platform | |
// var filename = 'atom-amd64.deb'; // or 'atom.x86_64.rpm' | |
// var url = 'https://github.com/atom/atom/releases/download/' + tag + '/' + filename; |
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
/** | |
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded | |
* templates and such with AngularJS. Use this simple directive to | |
* tame this beast once and for all. | |
* | |
* Usage: | |
* <input type="text" autofocus> | |
* | |
* License: MIT | |
*/ |
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
if (window.File && window.FileReader && window.FileList && window.Blob) { | |
// Great success! | |
function handleJSONDrop(evt) { | |
evt.stopPropagation(); | |
evt.preventDefault(); | |
var files = evt.dataTransfer.files; | |
// Loop through the FileList and read | |
for (var i = 0, f; f = files[i]; i++) { | |
// Only process json files. |
NewerOlder