Skip to content

Instantly share code, notes, and snippets.

View GabrielGil's full-sized avatar

Gabriel GabrielGil

View GitHub Profile
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 20, 2025 17:17
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@Ondreas
Ondreas / Menu 'Navicon' with CSS3 Gradient.html
Created September 19, 2013 13:17
Three Line Menu 'Navicon' CSS3 Gradient
<html>
<head>
<title>Three Line Menu 'Navicon' with CSS3 Box-Shadow</title>
<!-- http://css-tricks.com/three-line-menu-navicon/ -->
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<style type="text/css">
.gradient-menu {
padding-left: 1.25em;
@jonathandixon
jonathandixon / .gitignore
Last active January 5, 2021 22:01
Cordova CLI project .gitignore and helper script. Useful when you don't want to commit the platforms and plugins directories to version control. http://stackoverflow.com/q/17911204/417568
platforms/
plugins/
@BobNisco
BobNisco / controller.js
Last active February 27, 2023 15:43
onLongPress AngularJS Directive - Great for mobile!
// Somewhere in your controllers for this given example
// Example functions
$scope.itemOnLongPress = function(id) {
console.log('Long press');
}
$scope.itemOnTouchEnd = function(id) {
console.log('Touch end');
}
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@hamstu
hamstu / parallax.js
Last active February 7, 2024 15:20
Parallax Example: JavaScript
var ParallaxManager, ParallaxPart;
ParallaxPart = (function() {
function ParallaxPart(el) {
this.el = el;
this.speed = parseFloat(this.el.getAttribute('data-parallax-speed'));
this.maxScroll = parseInt(this.el.getAttribute('data-max-scroll'));
}
ParallaxPart.prototype.update = function(scrollY) {
@001101
001101 / accounting.sql
Created February 18, 2017 09:08 — forked from NYKevin/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 18, 2025 13:42
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@sixertoy
sixertoy / audio-proxy-server.js
Last active October 16, 2023 21:16
Simple Audio Streaming Proxy | NodeJS + Express + MP3
/**
* INSTALL:
* ----
* > yarn add express request
*
* RUN:
* ----
* > node ./audio-proxy-server
*/
const os = require('os');
@moshewe
moshewe / nest-gen-app-swagger.ts
Last active April 24, 2023 10:52
This script generates the swagger spec for a given NestJS Module. It takes the app's path, version and module name as parameters, with optionals for
import * as fs from 'fs';
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerDocument, SwaggerModule } from '@nestjs/swagger';
import * as commander from 'commander';
const program = new commander.Command();
program
.name('single-app-swagger-json-generator')
.arguments('--app-path <app-path> --app-version <app-version>')
.requiredOption('-a, --app-path <path>', 'path to app\'s folder')