aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m1.medium --key-name MyKeyPair --security-groups MySecurityGroup
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
Show hidden characters
/* | |
* Example jshint configuration file for Pebble development. | |
* Adapted from http://developer.getpebble.com/blog/2014/01/12/Using-JSHint-For-Pebble-Development/ | |
* | |
* Check out the full documentation at http://www.jshint.com/docs/options/ | |
*/ | |
{ | |
// Declares the existence of a global 'Pebble' object | |
"globals": { "Pebble" : true }, |
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
(* | |
This Apple script will resize any program window to an exact size and the window is then moved to the center of your screen. | |
Specify the program name, height and width below and run the script. | |
Written by Amit Agarwal on December 10, 2013 | |
*) | |
set theApp to "Google Chrome" |
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
javascript: (function(url) { | |
var script = document.createElement("script"); | |
script.setAttribute("src", url); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
document.body.appendChild(script); | |
console.log('jQuery injected'); | |
}, false); | |
document.body.appendChild(script); | |
})('//code.jquery.com/jquery-latest.min.js') |
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
public App() | |
{ | |
InitializeComponent(); | |
var dbPath = DependencyService.Get<IFileHelper>().GetLocalFilePath("todo.db"); | |
var persistActionsMiddleware = new PersistActionsMiddleware<ApplicationState>(dbPath); | |
Store = new Store<ApplicationState>( | |
Reducers.Reducers.ReduceApplication, | |
new ApplicationState(), | |
persistActionsMiddleware.CreateMiddleware()); |
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
const buildStats = require('./build.json'); | |
function getSize(modules) { | |
return modules.reduce((acc, val) => acc + val.size, 0); | |
} | |
const tpl = (type, modules) => `${type} files | |
-------- | |
no. of modules: ${modules.length} | |
total size: ${Math.round(getSize(modules) / 1000)} KB` |
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
; NOTE: This must be saved as UTF-8 BOM | |
emoji(text){ | |
If (A_EndChar = ":") { | |
SendInput %text% | |
} Else { | |
StringMid, s, A_ThisHotKey, 3 ; A_ThisHotKey contains 2 starting colons | |
SendRaw %s%%A_EndChar% | |
} | |
} |
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
create function dbo.IPAddressIsInRange(@ip as varchar(15), @range as varchar(18)) | |
returns bit | |
as | |
begin | |
declare @prefix varchar(15), | |
@cidr varchar(2), | |
@mask bigint | |
set @prefix = left(@range, charindex('/', @range) - 1) | |
set @cidr = right(@range, len(@range) - charindex('/', @range)) |
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
echo "Enter your password:"; read -s pass_str; sha1=$(echo -n $pass_str | tr -d '\n' | openssl sha1); echo "Hash prefix: ${sha1:0:5}"; echo "Hash suffix: ${sha1:5:35}"; result=$(curl https://api.pwnedpasswords.com/range/${sha1:0:5} 2>/dev/null | grep $(echo ${sha1:5:35} | tr '[:lower:]' '[:upper:]')); printf "Your password appeared %d times in the database.\\n" "${result#*:}" 2>/dev/null |
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
rem Place this in C:\Python27\python2.bat | |
@echo off | |
set OLDPATH=%PATH% | |
path C:\Python27;%PATH% | |
python.exe %* | |
path %OLDPATH% |
OlderNewer