Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Biswajit Dutta Baruah orthodoc

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

⇐ 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 Feb 1, 2018 — forked from dvidsilva/fbtoform.js
HTMLForm to Firebase sample
View fbtoform.js
(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 Dec 17, 2017 — forked from kkrishnan90/FirebasePhoneAuthIonicV3.md
Firebase Phone Auth using Ionic V3 - Sending and reading OTP
View FirebasePhoneAuthIonicV3.md

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 Sep 21, 2017 — forked from delameko/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04
View upgrade-postgres-9.5-to-9.6.md

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 Apr 7, 2017 — forked from mbostock/.block
Save SVG as PNG
View .block
license: gpl-3.0
View gist:4bc09545a752f3894515a57ec51edfb4
# domain.com nginx config
server {
listen 443;
server_name domain.com;
return 301 https://www.$server_name$request_uri;
}
server {
listen 80;
View ExamplePage.ts
import {Sql} from "../providers/Sql";
export class ExamplePage {
constructor(private sql: Sql) {
//sql.query(...);
//...
}
}
@orthodoc
orthodoc / err_stack_aws_method.js
Created Apr 13, 2016
Error stack when attempting to deploy an endpoint with aws type of integration
View err_stack_aws_method.js
sls endpoint deploy 'labs~GET' -s v2 -r us-east-1 --debug
serverless:lib.node_modules.serverless.lib.utils.index Reading file: /Users/bdb/sls/dx-backend/s-project.json... +0ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectCreate.js +336ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.core.ProjectCreate plugin loaded +3ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectInstall.js +3ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.core.ProjectInstall plugin loaded +9ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectInit.js +1ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.core.Proj
@orthodoc
orthodoc / err_stack_http_method.js
Created Apr 13, 2016
Error stack when attempting to implement http type of integration with serverless
View err_stack_http_method.js
sls endpoint deploy 'labs/{labId}~GET' -s v2 -r us-east-1 --debug
serverless:lib.node_modules.serverless.lib.utils.index Reading file: /Users/bdb/sls/dx-backend/s-project.json... +0ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectCreate.js +260ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.core.ProjectCreate plugin loaded +3ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectInstall.js +3ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.core.ProjectInstall plugin loaded +8ms
serverless:lib.node_modules.serverless.lib.Serverless Attempting to load plugin from /Users/bdb/.nvm/versions/node/v4.2.3/lib/node_modules/serverless/lib/actions/ProjectInit.js +1ms
serverless:lib.node_modules.serverless.lib.Serverless serverless.c
@orthodoc
orthodoc / gist:852eef177e62cdaff13f
Last active Sep 21, 2015 — forked from jason-engage/gist:56b3df8f294af35cd58d
Gulp File for Minifying / Concat / Removing Comments and Console logs of Ionic Project
View gist:852eef177e62cdaff13f
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');