Skip to content

Instantly share code, notes, and snippets.

Avatar

Shikhir Singh shikhirsingh

View GitHub Profile
@shikhirsingh
shikhirsingh / Application.scss
Created Apr 6, 2016
Yummy Chocolate Treat Theme for Ext JS 6 apps
View Application.scss
// Defining Colors
$white_chocolate: #A99386;
$milk_chocolate : #523027;
$caramel_chocolate: #9C6D51;
$dark_chocolate : #5D4446;
$silver_spoons: #a79c8e;
$strawberry_chocolate: #f1bbba;
$strawberry_mousse: #EB9F9F;
@shikhirsingh
shikhirsingh / Paste in Chrome Console
Created Apr 14, 2016
Detect Ext JS Layout Run in Chrome Console
View Paste 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 Aug 23, 2016
A template package.json for packaging an Ext JS app with Electron
View package.json
{
"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 / main.js
Created Aug 28, 2016
A template main.js for the (Electron) Main Process used to launch an Ext JS index.html file
View main.js
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 Sep 11, 2016
A template package.json for packaging an Ext JS app with Electron for macOS ONLY
View package.json
{
"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 / change.sh
Last active Aug 27, 2017
Changes FROM_STRING string recursively inside all specified file types to TO_STRING
View change.sh
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 Oct 2, 2017
Docker Compose MySql
View docker-compose.yml
# 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 Nov 19, 2017
cURL: Send an ARN SMS using TeleSign API
View sms-arn.sh
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 / score.sh
Last active Nov 20, 2017
cURL: Get Fraud Risk Score of Phone Number using TeleSign's Score API
View score.sh
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-otp.sh
Created Nov 19, 2017
cURL: Send an OTP SMS using TeleSign API
View sms-otp.sh
# 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"
You can’t perform that action at this time.