Skip to content

Instantly share code, notes, and snippets.

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

Raúl raulghm

🏠
Working from home
View GitHub Profile
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active April 28, 2025 16:22
Vanilla JavaScript Quick Reference / Cheatsheet
@ebuildy
ebuildy / Dockerfile
Created January 25, 2016 10:25
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
FROM ubuntu:trusty
ENV HOME /root
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN add-apt-repository ppa:ondrej/php && \
apt-get update
@nucliweb
nucliweb / CSS-Tools.md
Last active June 24, 2024 17:11
CSS Tools
@EtienneR
EtienneR / user.js
Created January 7, 2016 23:39
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@JoshKaufman
JoshKaufman / digitalocean console paste.js
Created January 7, 2016 00:17
enables sending string to digitalocean web console stdin
var sendString = (function(rfb, force, sendDelay) {
sendDelay = sendDelay || 25;
var _q = [];
var _qStart = function() {
var chr = _q.shift();
if (chr) {
rfb.sendKey(chr);
setTimeout(_qStart, sendDelay);
}
};
@juanbrujo
juanbrujo / npm-starter.js
Last active February 11, 2024 23:16
Starter for a basic NPM module
// moduleName = name of your npm module
var moduleName = (function moduleName() {
"use strict";
// YOUR PRETTY JS CODE THAT WILL CHANGE THE WORLD
// return whatever;
})( this );
@raulghm
raulghm / semantic_versioning.md
Last active August 29, 2015 14:26
Semantic Versioning

Semantic Versioning

1.2.3

major minor patch
1 2 3

major: incompatible API changes

@AllThingsSmitty
AllThingsSmitty / negative-nth-child.css
Created July 23, 2015 14:45
Use negative nth-child to select items 1 through n
li {
display: none;
}
/* select items 1 through 3 and show them */
li:nth-child(-n+3) {
display: block;
}
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active April 16, 2025 16:52
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@simonsmith
simonsmith / example.js
Created March 16, 2015 00:23
Compiling SUIT with gulp and postcss
var gulp = require('gulp');
var bemLinter = require('postcss-bem-linter');
var atImport = require('postcss-import');
var cssnext = require('cssnext');
var postcss = require('gulp-postcss');
var concat = require('gulp-concat');
var notify = require('gulp-notify');
var stylus = require('gulp-stylus');
gulp.task('css', function() {