Skip to content

Instantly share code, notes, and snippets.

View rlamana's full-sized avatar

Ramón Lamana rlamana

View GitHub Profile
@paulbbauer
paulbbauer / main.js
Last active October 8, 2024 17:08
Electron oAuth Authentication with GitHub API
// based on:
// http://iamemmanouil.com/blog/electron-oauth-with-github/
// https://github.com/ekonstantinidis/gitify
// this version uses https rather than superagent
var querystring = require('querystring');
var https = require("https");
// Your GitHub Applications Credentials
@amatiasq
amatiasq / clone.js
Last active February 15, 2021 22:18
Creates a copy of a object duplicating every property, even prototyped ones.
var extend = Object.getOwnPropertyNames ?
function ecma5extend(obj) {
var proto = obj;
var protos = [];
var result = {};
var descriptors = {};
while (proto) {
protos.push(proto);
proto = Object.getPrototypeOf(proto);
@amatiasq
amatiasq / grid.less
Last active February 15, 2021 22:18
A mixin to create a N * N css classes grid.
.grid_column(@prefix; @index; @base) {
@fullclass: ~'.grid-@{prefix}col@{index}';
@{fullclass} { left: @base * @index; }
}
.grid_row(@prefix; @index; @base) {
@fullclass: ~'.grid-@{prefix}row@{index}';
@{fullclass} { top: @base * @index; }
}
.grid_width(@prefix; @index; @base) {
@fullclass: ~'.grid-@{prefix}hspan@{index}';