Skip to content

Instantly share code, notes, and snippets.

View orthodoc's full-sized avatar
🎯
Focusing

Biswajit Dutta Baruah orthodoc

🎯
Focusing
View GitHub Profile
@orthodoc
orthodoc / SCSS.md
Created March 26, 2018 02:38 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@orthodoc
orthodoc / fbtoform.js
Created February 1, 2018 12:31 — forked from dvidsilva/fbtoform.js
HTMLForm to Firebase sample
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'https://www.gstatic.com/firebasejs/3.0.2/firebase.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
})();
_setFormData = function setFormData (sel, data) {
console.info('setting form to data', data);
@orthodoc
orthodoc / FirebasePhoneAuthIonicV3.md
Created December 17, 2017 22:31 — forked from kkrishnan90/FirebasePhoneAuthIonicV3.md
Firebase Phone Auth using Ionic V3 - Sending and reading OTP

General Steps to be followed as a flow process to complete Firebase Phone OTP Auth in Ionic V3

Step 1 : Get the phone number through input from the user. Step 2 : Pass this phone number to the firebase and receive a callback with verification ID. Step 3 : Pass on this verification ID through navParams to the next page where the user will enter the OTP sent to the entered mobile number. Step 4 : Verify the OTP that is sent with firebase for success() or failure() .

STEP 1 & 2 & 3

phone-verification.html

@orthodoc
orthodoc / upgrade-postgres-9.5-to-9.6.md
Created September 21, 2017 06:20 — forked from delameko/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@orthodoc
orthodoc / .block
Created April 7, 2017 17:19 — forked from mbostock/.block
Save SVG as PNG
license: gpl-3.0
@orthodoc
orthodoc / gist:4bc09545a752f3894515a57ec51edfb4
Created March 13, 2017 07:03 — forked from MadMartigan/gist:641318f4d3b407cb8eeac79a591944c1
Postgrest SSL reverse proxy config for nginx
# domain.com nginx config
server {
listen 443;
server_name domain.com;
return 301 https://www.$server_name$request_uri;
}
server {
listen 80;
import {Sql} from "../providers/Sql";
export class ExamplePage {
constructor(private sql: Sql) {
//sql.query(...);
//...
}
}
@orthodoc
orthodoc / gist:852eef177e62cdaff13f
Last active September 21, 2015 08:15 — forked from jason-engage/gist:56b3df8f294af35cd58d
Gulp File for Minifying / Concat / Removing Comments and Console logs of Ionic Project
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var compass = require('gulp-compass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var path = require('path');
@orthodoc
orthodoc / gist:5f0060ec7eed6bda9ce2
Last active September 21, 2015 08:09 — forked from jason-engage/gist:e072cc300fd789e8841e
Ionic Register Push Function Example with Payload and ionicPopup for Android and IOS
//Here is the curl commands I use to test - make sure you update the CAPSVARS. You can add an item ID Payload or not.
//For example if your app displays items, it can navigate to a specific item.
//If you want to add more state names, instead of only going to specific items:
//add another payload property called 'stateName'
//create a goState() function to accept a stateName as a parameter
//and modify the registerPush() to find the stateName property and pass into your goState().
//Android
curl -u YOURAPIKEY: -H "Content-Type: application/json" -H "X-Ionic-Application-Id: APPID" https://push.ionic.io/api/v1/push -d '{"tokens":["ANDROIDTOKEN"],"notification":{"alert":"I come from planet Ion.", "android":{"title":"This is a title2", "payload":{"sound":"notification.mp3","itemId":"7TF00hJI78Y"}}}}'

Movies Recommendation:

Music Recommendation: