Skip to content

Instantly share code, notes, and snippets.

Enrique nr1q

Block or report user

Report or block nr1q

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yairEO / events.namespace.js
Last active Dec 22, 2019
Event Handler Namespace in Vanilla JavaScript
View events.namespace.js
var events = (function(){
function addRemove(op, events, cb){
if( cb )
events.split(' ').forEach(name => {
var ev = name.split('.')[0]
cb = cb || this._eventsNS[name]
this[op + 'EventListener'].call(this, ev, cb)
if(op == 'add')
philipjewell /
Last active Jan 20, 2020
Download all your photobucket images in bulk via CLI


On Jul 4, 2017 posted an article about photobucket (silently) no longer allowing their users to source their images on 3rd party websites for free, thus leaving websites all over the web broken displaying the following image in replace:

Me being one of those individual, I attempted to go into my photobucket account and download my content as I now have my own hosting I am able to store those images on; however, the only ways to bulk download (on desktop) is by downloading albums through their interface. Doing so, gave me the following error message: "Hmmm. Something didn't click. Want to give it another shot? Try again now."

Doing this serveral times, in different browsers (chrome, firefox and safari), after disabling all my addons and extensions (including ad blockers), it still didn't work.

At this point, doing anything on their website w

View es6-abstract-class-example.js
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if ( === {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
mistercoffee66 / jquery-dosomething-ES6.js
Last active Nov 6, 2019
ES6 module importing jQuery plugin
View jquery-dosomething-ES6.js
//after modification
//assumes jQuery is avail as global or via NPM etc
import jQuery from 'jquery'
export default function() {
+function($) {
var $this = $(this);
var newText = $'text');
daragao /
Last active Nov 29, 2018
YouCompleteMe "let g:ycm_global_ycm_extra_conf = "~/.vim/"
# add this to your vimrc
#let g:ycm_global_ycm_extra_conf = "~/.vim/"
# Partially stolen from
import os
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
ryansechrest /
Last active Jan 17, 2020
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
kpeatt / gist:5154680
Last active Nov 7, 2019 — forked from tvandervossen/gist:1231476
Viewport sizes for iPad, iPhone 4 and under, and iPhone 5 and up.
View gist:5154680
iPad (Actual pixels in brackets)
1024 × 690 (2048 x 1380) In landscape on iOS 4.3
1024 × 672 (2048 x 1344) In landscape on iOS 5
768 × 946 (1536 x 1892) In portrait on iOS 4.3
768 × 928 (1536 x 1856) In portrait on iOS 5
1024 × 660 (2048 x 1320) Always showing bookmarks bar in landscape on iOS 4.3
1024 × 644 (2048 x 1288) Always showing bookmarks bar in landscape on iOS 5
768 × 916 (1536 x 1832) Always showing bookmarks bar in portrait on iOS 4.3
wpscholar / functions.php
Last active Dec 4, 2019
Enqueueing IE conditional stylesheets in WordPress the right way
View functions.php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE.
* IE10 and up does not support conditional comments in standards mode.
* @uses wp_style_add_data() WordPress function to add the conditional data.
* @link
jasonm23 / xterm-256color.svg
Last active Jan 15, 2020
Xterm 256color mode color chart, organised into sections.
View xterm-256color.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
spicycode / tmux.conf
Created Sep 20, 2011
The best and greatest tmux.conf ever
View tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
You can’t perform that action at this time.