Skip to content

Instantly share code, notes, and snippets.

View shikhirsingh's full-sized avatar

Shikhir Singh shikhirsingh

View GitHub Profile
@shikhirsingh
shikhirsingh / Paste in Chrome Console
Created April 14, 2016 18:08
Detect Ext JS Layout Run in Chrome Console
Ext.Function.interceptBefore(Ext.layout.Context.prototype, 'run', function () { console.log('Layout run has occurred - look at the call stack'); debugger; })
@shikhirsingh
shikhirsingh / package.json
Created September 11, 2016 20:56
A template package.json for packaging an Ext JS app with Electron for macOS ONLY
{
"name": "starterapp",
"version": "1.0.0",
"description": "A starter Ext JS 6 App",
"main": "./app/main.js",
"scripts": {
"start": "electron .",
"package": "electron-packager ./ starterapp --platform=darwin --out ./dist --overwrite",
"test": "echo \"Error: no test specified\" && exit 1"
},
@shikhirsingh
shikhirsingh / package.json
Created August 23, 2016 17:10
A template package.json for packaging an Ext JS app with Electron
{
"name": "starterapp",
"version": "1.0.0",
"description": "A starter Ext JS 6 App",
"main": "./app/main.js",
"scripts": {
"start": "electron .",
"package": "electron-packager ./ starterapp --all --out ./dist --overwrite",
"test": "echo \"Error: no test specified\" && exit 1"
},
@shikhirsingh
shikhirsingh / change.sh
Last active August 27, 2017 22:42
Changes FROM_STRING string recursively inside all specified file types to TO_STRING
grep --include \*.cpp --include \*.hpp --include \*.xml --include \*.json --include \*.js -rli 'FROM_STRING' * | xargs sed -i '' 's/FROM_STRING/TO_STRING/g'
@shikhirsingh
shikhirsingh / docker-compose.yml
Last active October 2, 2017 03:50
Docker Compose MySql
# wget https://gist.githubusercontent.com/shikhirsingh/091cb3513a4ace097b0d4d5a3b5dcc9e/raw/2c8b00808d5874737c7e70c9b937bb69e74cb41a/docker-compose.yml
version: '3'
services:
auroradb:
image: mysql:5.6
ports:
- "3306:3306"
environment:
@shikhirsingh
shikhirsingh / sms-arn.sh
Last active November 19, 2017 23:05
cURL: Send an ARN SMS using TeleSign API
curl -X POST https://rest-api.telesign.com/v1/messaging \
-d phone_number=XXXXXXXX \
-d message="You have a dentist appointment at 2:15pm" \
-d message_type="ARN" \
-u "CUSTOMER_ID":"API_KEY"
@shikhirsingh
shikhirsingh / sms-otp.sh
Created November 19, 2017 23:06
cURL: Send an OTP SMS using TeleSign API
# This only works on a Unix/Linux system
curl -X POST https://rest-api.telesign.com/v1/messaging \
-d phone_number=XXXXXXXX \
-d message="Your code is $RANDOM" \
-d message_type="ARN" \
-u "CUSTOMER_ID":"API_KEY"
@shikhirsingh
shikhirsingh / phoneid.sh
Created November 20, 2017 00:25
cURL: Get a Phone Number's ID Attributes using TeleSign API
curl -X POST https://rest-api.telesign.com/v1/phoneid/<complete_phone_number> \
-d account_lifecycle_event="sign-in" \
-u "CUSTOMER_ID":"API_KEY"
@shikhirsingh
shikhirsingh / score.sh
Last active November 20, 2017 00:25
cURL: Get Fraud Risk Score of Phone Number using TeleSign's Score API
curl -X POST https://rest-api.telesign.com/v1/score/<complete_phone_number> \
-d account_lifecycle_event="sign-in" \
-u "CUSTOMER_ID":"API_KEY"
@shikhirsingh
shikhirsingh / voice-message.sh
Last active November 20, 2017 01:56
cURL: Send an OTP Voice Message using TeleSign API
curl -X POST https://rest-api.telesign.com/v1/voice \
-d phone_number=XXXXXXXX \
-d message="You have a dentist appointment at 2:15pm" \
-d message_type="ARN" \
-u "CUSTOMER_ID":"API_KEY"