Skip to content

Instantly share code, notes, and snippets.

View Lapicher's full-sized avatar
🤓

Nataly Contreras Lapicher

🤓
  • CIDESI
  • Querétaro, méxico.
View GitHub Profile
@ryanwoodsmall
ryanwoodsmall / lkvh.c
Created October 25, 2017 07:02
get linux kernel version from linux/version.h header and uname() syscall
#include <stdio.h>
#include <linux/version.h>
#include <sys/utsname.h>
/*
* from rhel7's linux/version.h:
* #define LINUX_VERSION_CODE 199168
* #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
*/
@sirodoht
sirodoht / migrate-django.md
Last active September 22, 2025 17:30
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@hollodotme
hollodotme / Install-nginx-with-http2-support.md
Created April 9, 2016 17:07
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
@ishults
ishults / Grails_Groovy_Versions.txt
Last active May 22, 2025 14:31
List of Groovy versions for Grails
// Compiled by Igor Shults
// Last Updated: July 23, 2020
GRAILS GROOVY SOURCE
4.1.0 2.5.14 https://github.com/grails/grails-core/blob/v4.1.0/gradle.properties
4.0.4 2.5.6
4.0.3 2.5.6
4.0.2 2.5.6
4.0.1 2.5.6
4.0.0 2.5.6 https://github.com/grails/grails-core/blob/v4.0.0/build.gradle
@atd-schubert
atd-schubert / Gitlab-with-unbundled-nginx.md
Last active February 26, 2024 12:14
gitlab with own nginx

How to setup gitlab without embedded nginx

Install via omnibus-package

install the normal way:

wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.2-omnibus.5.4.2.ci-1_amd64.deb & > /dev/null

sudo apt-get update
sudo apt-get upgrade
@walkermatt
walkermatt / debounce.py
Created June 4, 2012 21:44
A debounce function decorator in Python similar to the one in underscore.js, tested with 2.7
from threading import Timer
def debounce(wait):
""" Decorator that will postpone a functions
execution until after wait seconds
have elapsed since the last time it was invoked. """
def decorator(fn):
def debounced(*args, **kwargs):
def call_it():