Skip to content

Instantly share code, notes, and snippets.

View sibinx7's full-sized avatar
🏠
Working from home

Sibin Xavier sibinx7

🏠
Working from home
View GitHub Profile
@sibinx7
sibinx7 / gulpfile.js
Last active January 25, 2016 12:57
React babelify with gulp, gulp task to compile React in ES2015/ES6 mode
var gulp = require('gulp')
var browserify = require("browserify")
var babelify = require("babelify")
var source = require('vinyl-source-stream');
var livereload = require('gulp-livereload');
gulp.task("react",function(){
return browserify({
entries:'./app/assets/javascripts/react/main.js',
debug: true
})
@sibinx7
sibinx7 / snippets.coffee
Created November 24, 2016 11:20
Angular coffee
app = angular.module 'myapp',[
'ui.router'
'ngResource'
]
app.config ($stateProvider, $urlRouterProvider) ->
# For any unmatched url, send to /route1
$urlRouterProvider.otherwise '/home'
$stateProvider.state 'home',
url: '/home'
templateUrl: 'partials/home.html'
@sibinx7
sibinx7 / wordpress-genesis.md
Last active February 6, 2017 10:45
Learning Wordpress genesis

Tips and Tricks while learning Genesis Theme Framework

Sample code to remove loop

add_action('genesis_meta','quick_tips_meta');

function quick_tips_meta(){
@sibinx7
sibinx7 / sublime-text.md
Created February 10, 2017 13:28
Sublime settings
{
	"auto_complete_commit_on_tab": true,
	"caret_style": "solid",
	"default_line_ending": "LF",
	"draw_white_space": "all",
	"enable_tab_scrolling": false,
	"ensure_newline_at_eof_on_save": true,
	"file_exclude_patterns":
	[
@sibinx7
sibinx7 / custom-sass.md
Created February 16, 2017 10:56
Useful mixins, styles

Mixins

/*******************************************
*       COMMON MIXINS AND KEYFRAMES        *
*******************************************/

@mixin c-border-radius($top-right,$bottom-right,$bottom-left,$top-left){
  -webkit-border-top-right-radius: $top-right;
  -webkit-border-bottom-right-radius: $bottom-right;
  -webkit-border-bottom-left-radius: $bottom-left;
@sibinx7
sibinx7 / rails_helping_file.md
Last active March 13, 2017 15:53
My Rails help file

RAILS_ENV=<env_state> rails c

ENV or > ENV["key"]

Rails Controller without assets, helpers and views

rails generate controller home index  --no-helper --no-assets --no-controller-specs --no-view-specs --no-test-framework --skip-test-unit --skip-template-engine
@sibinx7
sibinx7 / ember-js-learning.md
Last active July 24, 2017 14:35
Learn ember js

Ember JS

Deployment on heroku

heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
@sibinx7
sibinx7 / webpack-learning.md
Created July 28, 2017 10:57
Learn more about webpack 3

Webpack 3 is now available

Scope hoisting. Enable this feature

plugins:[ new webpack.optimize.ModuleConcatenationPlugin() ]

@sibinx7
sibinx7 / awesome-js-style-plugins.md
Last active August 20, 2017 06:07
List of awesome Jquery CSS plugins
@sibinx7
sibinx7 / heroku.md
Last active August 31, 2017 14:28
Heroku tips

Node Application

Heroku won't install devdependencies in production mode

heroku config:set NPM_CONFIG_PRODUCTION=false

Set env variables

heroku config:set GITHUB_USERNAME=joesmith