⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-gray; icon-glyph: magic; | |
// Change these to your usernames! | |
const user = "mrnovalles"; | |
// API PARAMETERS !important | |
// WEATHER_API_KEY, you need an Open Weather API Key | |
// You can get one for free at: https://home.openweathermap.org/api_keys (account needed). |
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
{ | |
"iss": "https://accounts.google.com", | |
"azp": "649633060683-qg1qg192072fcgcu88boonels10hahm9.apps.googleusercontent.com", | |
"aud": "649633060683-qg1qg192072fcgcu88boonels10hahm9.apps.googleusercontent.com", | |
"sub": "113941317832870254694", | |
"hd": "tonsser.com", | |
"email": "[email protected]", | |
"email_verified": true, | |
"at_hash": "c-bh98_BDOOVnW0zr1ZL3A", | |
"name": "Mariano Vallés", |
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 | |
echo "List of Github users for pubkey retrieval (space separated):" | |
read users | |
for user in $users; do | |
wget https://github.com/$user.keys -O - >> /home/deploy/.ssh/authorized_keys | |
done | |
chown -R deploy:deploy /home/deploy/.ssh |
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
def caseClassToParams(cc: Product) = { | |
val fields = cc.getClass.getDeclaredFields.map(_.getName) | |
val keyValues = fields.zip(cc.productIterator.to).toList | |
keyValues.flatMap { | |
case ("foo", v) => { | |
val values = v.toString.split("&").toList | |
values.map{ p => | |
val pair = p.split("=") | |
(pair.head, pair.last) | |
} |
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
on idle | |
tell application "System Events" | |
tell current location of network preferences | |
set vpnConnection to the service "VPN" | |
-- Check if Transmission is running | |
tell application "System Events" | |
set transmissionIsRunning to (count of (every process whose name is "Transmission")) > 0 | |
end tell |
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
for OG_URL in `cat og_urls.txt` | |
do | |
curl -X POST \ | |
-F "id=$OG_URL" \ | |
-F "scrape=true" \ | |
"https://graph.facebook.com" | |
done |
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
for i in `netstat -na |grep LISTEN |grep -v unix | tr -s ' ' | cut -d " " -f 4 |awk -F. '{print $NF}'`; do echo -e "\n*** Process listening on port $i: ***\n"; sudo lsof -i :$i; done |
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
Show hidden characters
{ | |
"auto_complete_commit_on_tab": false, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Tomorrow-Theme/Tomorrow-Night.tmTheme", | |
"default_line_ending": "unix", | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", |
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
-module(signature). | |
-export([test/0]). | |
% Looking at using Open SSH public and private keys | |
% for signing and verifying hashed data. | |
load_public_key(Filename) -> | |
{ok, SshBin} = file:read_file(Filename), | |
[{PubKey,_}] = public_key:ssh_decode(SshBin, public_key), | |
PubKey. |
NewerOlder