Skip to content

Instantly share code, notes, and snippets.

View praveenpuglia's full-sized avatar
👨‍💻
...human in progress

Praveen Puglia praveenpuglia

👨‍💻
...human in progress
View GitHub Profile
@tovbinm
tovbinm / gist:2975609
Created June 22, 2012 22:47
Remove the “Last login” message from the Mac OS X Terminal
Remove:
touch .hushlogin
Get it back:
rm .hushlogin
@mikaelbr
mikaelbr / gulpfile.js
Created January 14, 2014 20:24
Example gulpfile for complete set-up.
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
@torgeir
torgeir / gulpfile.js
Last active June 12, 2023 09:52 — forked from markgoodyear/01-gulpfile.js
Example gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@candycode
candycode / image-arraybuffer.js
Created March 7, 2014 15:24
Create a jpg image from ArrayBuffer data
// Simulate a call to Dropbox or other service that can
// return an image as an ArrayBuffer.
var xhr = new XMLHttpRequest();
// Use JSFiddle logo as a sample image to avoid complicating
// this example with cross-domain issues.
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true );
// Ask for the result as an ArrayBuffer.
xhr.responseType = "arraybuffer";
@trey
trey / git-commit-author-rewrite.md
Last active April 26, 2024 17:52
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@iambibhas
iambibhas / facebook_url_redirect_avoid.js
Last active November 20, 2015 12:55
UserScript to avoid Facebook's URL director
// ==UserScript==
// @name Facebook URL Redirector Bypass
// @namespace in.bibhas
// @include https://*.facebook.com/*
// @version 1
// @grant none
// ==/UserScript==
si = window.setInterval(clearanchors, 2000);
function clearanchors(){
anchors = document.getElementsByTagName('a');
@MarkTiedemann
MarkTiedemann / README.md
Last active July 18, 2021 11:42
An Easier Way to Enforce Required Parameters in ES6

An Easier Way to Enforce Required Parameters in ES6

Expands on Handling required parameters in ECMAScript 6 by Axel Rauschmayer.

The idea (which is credited to Allen Wirfs-Brock) is, in essence, to use default parameter values to call a function which throws an Error if the parameter is missing:

const throwIfMissing () => { throw new Error('Missing parameter') }
@bradens
bradens / slack-dark-theme.css
Last active February 1, 2019 07:56
Dark theme for slack
#msgs_scroller_div::-webkit-scrollbar-track, #client_body::before, .client_container,
#search_terms, #client_body, #footer, ts-message, .channel_header, ts-jumper ts-jumper-container,
ts-jumper input[type="text"] {
background: #282c34 !important;
}
#client_body::before {
border-bottom: 1px solid #1a2129 !important;
}
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 26, 2024 15:48
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example