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 | |
PARAMS=('-m 6 -q 70 -mt -af -progress') | |
if [ $# -ne 0 ]; then | |
PARAMS=$@; | |
fi | |
cd $(pwd) |
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
#!/usr/bin/python2.6 | |
from itertools import chain | |
from Quartz import CGWindowListCreate as create_list | |
from Quartz import CGMainDisplayID as display_id | |
from Quartz import CGWindowListCreateDescriptionFromArray as lookup | |
import sys | |
class Windows(list): | |
def find(self, name): |
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
itemTpl:[ | |
"<div>", | |
"<div style='font-weight:bold;' class='list-item-title'>{FIRST_NAME} {LAST_NAME} </div>", | |
"<div class='list-item-narrative'>{EMAIL}</div>", | |
"<div class='list-item-narrative'>{PHONE}</div>", | |
"<div style='font-style:italic;' class='list-item-narrative'>", | |
"<tpl if='ACTIVE == 1'>", | |
"Active: True", | |
"</tpl>", | |
"</div>", |
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
rm -rf /Applications/zoom.us.app/ | |
lsof -i :19421 | awk 'NR!=1{print $2}' | xargs kill -9 | |
rm -rf ~/.zoomus | |
touch ~/.zoomus |
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
"since 2017, not Baidu > 0, not QQAndroid > 0, not iOS > 0, not Samsung > 0, not Android > 0, not FirefoxAndroid > 0, not ChromeAndroid > 0" | |
or | |
"['chrome > 55', 'edge > 15', 'firefox > 52', 'safari > 10.1', 'opera > 42']" as of Nov 2018 | |
Both queries amount to the same things at one point in time, but the top one updates |
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
git() { | |
if [[ "$1" = "status" ]]; then | |
command git status; | |
command git --no-pager diff --shortstat HEAD | |
else | |
command git "$@" | |
fi | |
} |
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
const pProps = require('p-props'); | |
const sleep = (message) => new Promise(resolve => setTimeout(() => resolve(message), Math.floor(Math.random() * 2500))); | |
const get = message => sleep(message).then(res => res); | |
const data = { | |
Amit: get('Amit'), | |
vitae: get('vitae'), | |
Lorem: { | |
Tellus: get('Tellus'), |
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
Edit this file: | |
~/bin/Sencha/Cmd/3.1.2.342/sencha.cfg | |
Change line 33 to look like this: | |
cmd.jvm.args=-Xms128m -Xmx1024m -Djava.awt.headless=true -Dhttp.proxyHost=proxy.proxy.com -Dhttp.proxyPort=80 |
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
sendPushNotification(token = this.state.token, title = this.state.title, body = this.state.body) { | |
return fetch('https://exp.host/--/api/v2/push/send', { | |
body: JSON.stringify({ | |
to: token, | |
title: title, | |
body: body, | |
data: { message: `${title} - ${body}` }, | |
}), | |
headers: { | |
'Content-Type': 'application/json', |
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
async registerForPushNotifications() { | |
const { status } = await Permissions.getAsync(Permissions.NOTIFICATIONS); | |
if (status !== 'granted') { | |
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS); | |
if (status !== 'granted') { | |
return; | |
} | |
} |
NewerOlder