Skip to content

Instantly share code, notes, and snippets.

View diniremix's full-sized avatar

Jorge Brunal diniremix

View GitHub Profile
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@diniremix
diniremix / gist:1370410
Created November 16, 2011 15:44 — forked from persand/gist:1355589
Bash script for github.com/x URL:s -> git.io
function shit() {
if [ -n "$2" ]; then
curl -i http://git.io -F url=https://github.com/"$1" -F code="$2";
else
curl -i http://git.io -F url=https://github.com/"$1";
fi
}
@geedelur
geedelur / git-flow_windows.textile
Created July 30, 2012 16:31
Git-flow Windows Install
@robdodson
robdodson / underscore-mustache-jade-template.jade
Created August 6, 2012 23:19
Mustache, Underscore, Jade template
script(type="text/html", id="modal-service-selection")
.modal-service-selection.modal-centered.modal.stretch.hide.fade
.modal-header
a.button-close(data-dismiss='modal')
img(src="../img/icons/latest/icon-exit.png")
h3 You have selected
span.emphasize {{ service.name }}
p Please select the subcategory that fits your needs:
.modal-body
ul.l-horizontal.clearfix.reservation-entries
@sagacity
sagacity / Program.cs
Created November 13, 2012 16:49
M3U to Spotify tracks
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
@RonnyO
RonnyO / console.lol.js
Created January 16, 2013 09:17
Like console.log, just a tiny bit funnier
// console.lol by @RonnyOrbach, idea by Erez Avny
if (typeof console != 'undefined') console.lol = function(){
var args = [].slice.call(arguments, 0);
args.unshift("LOL");
args.push("LOLOLOL!")
console.log.apply(console, args);
};
@mihkels
mihkels / 1-req.sh
Last active October 24, 2022 19:20
Ubuntu 12.04 with flask + nginx + uwsgi
#!/bin/bash
sudo apt-get update
# Now let's install all the required ubuntu packages
sudo apt-get install build-essential uwsgi nginx uwsgi-plugin-python python-pip
# PS! If you are doing this stuff for fun I do recommend to install nginx from PPA repository
# that you can find here https://launchpad.net/~nginx/+archive/development
@skyrpex
skyrpex / qt5-fusion-dark.cpp
Last active October 5, 2022 10:57
Qt5 Fusion style (dark color palette)
qApp->setStyle(QStyleFactory::create("fusion"));
QPalette palette;
palette.setColor(QPalette::Window, QColor(53,53,53));
palette.setColor(QPalette::WindowText, Qt::white);
palette.setColor(QPalette::Base, QColor(15,15,15));
palette.setColor(QPalette::AlternateBase, QColor(53,53,53));
palette.setColor(QPalette::ToolTipBase, Qt::white);
palette.setColor(QPalette::ToolTipText, Qt::white);
palette.setColor(QPalette::Text, Qt::white);
@addyosmani
addyosmani / examples.md
Last active February 23, 2016 18:22
Object.observe() examples from my talk

What are we trying to observe? Raw object data.

// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
 
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
@neilsoult
neilsoult / LazyLoad.js
Created October 31, 2013 19:40
LazyLoad directive for loading external javascript for AngularJs. In this example, I use google maps' API as the external library being loaded
angular.module('testApp', []).
directive('lazyLoad', ['$window', '$q', function ($window, $q) {
function load_script() {
var s = document.createElement('script'); // use global document since Angular's $document is weak
s.src = 'https://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize';
document.body.appendChild(s);
}
function lazyLoadApi(key) {
var deferred = $q.defer();
$window.initialize = function () {