Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View shikhirsingh's full-sized avatar

Shikhir Singh shikhirsingh

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / main.js
Created August 28, 2016 20:44
A template main.js for the (Electron) Main Process used to launch an Ext JS index.html file
const {app, BrowserWindow} = require('electron');
function createWindow () {
console.log('Hello from electron');
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600})
// and load the index.html of the app.
@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 / 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 / Application.scss
Created April 6, 2016 21:53
Yummy Chocolate Treat Theme for Ext JS 6 apps
// Defining Colors
$white_chocolate: #A99386;
$milk_chocolate : #523027;
$caramel_chocolate: #9C6D51;
$dark_chocolate : #5D4446;
$silver_spoons: #a79c8e;
$strawberry_chocolate: #f1bbba;
$strawberry_mousse: #EB9F9F;