Skip to content

Instantly share code, notes, and snippets.

View charlycoste's full-sized avatar
🏃‍♂️
migrated to my own gitlab and gitlab.com #ByeMicrosoft

Charles-Édouard Coste charlycoste

🏃‍♂️
migrated to my own gitlab and gitlab.com #ByeMicrosoft
View GitHub Profile
@ryanflorence
ryanflorence / static_server.js
Last active April 26, 2024 16:18
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@rodw
rodw / backup-github.sh
Last active March 30, 2024 15:04
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@martijnvermaat
martijnvermaat / nixos.md
Last active March 24, 2024 11:42
Installation of NixOS with encrypted root
@Nadrieril
Nadrieril / shell.nix
Last active March 17, 2024 08:03
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh
@brian-mann
brian-mann / FadeTransitionRegion.js
Created October 24, 2012 16:28
Allows jQuery animation transitions between marionette regions
var FadeTransitionRegion = Backbone.Marionette.Region.extend({
show: function(view){
this.ensureEl();
view.render();
this.close(function() {
if (this.currentView && this.currentView !== view) { return; }
this.currentView = view;
@floptwo
floptwo / php-cli_ovh_mutu.md
Last active April 25, 2023 08:40
OVH PHP-CLI

PHP-CLI (PHP en ligne de commande) sur les hébergements mutualisés OVH

More complete info here http://cluster015.ovh.net/infos/ (thanks to @42antoine)

(cli)

/usr/local/php5.3/bin/php => PHP 5.3.29 (cli) (built: Nov 21 2017 08:55:07)
/usr/local/php5.4/bin/php => PHP 5.4.45 (cli) (built: Nov 21 2017 08:35:51)
/usr/local/php5.5/bin/php => PHP 5.5.38 (cli) (built: Nov 21 2017 08:46:45)
@nhoizey
nhoizey / screenshots.js
Created November 12, 2012 17:07
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
@gpiancastelli
gpiancastelli / goodreads-oauth-example.py
Created August 19, 2010 13:50
A Python example of how to use OAuth on GoodReads
import oauth2 as oauth
import urlparse
url = 'http://www.goodreads.com'
request_token_url = '%s/oauth/request_token/' % url
authorize_url = '%s/oauth/authorize/' % url
access_token_url = '%s/oauth/access_token/' % url
consumer = oauth.Consumer(key='Your-GoodReads-Key',
secret='Your-GoodReads-Secret')
@ilhooq
ilhooq / phpls.plugin
Last active September 1, 2021 21:45
A gnome-builder plugin to provide PHP Language Server integration with Phpactor
[Plugin]
Authors=Sylvain PHILIP <contact@sphilip.com>
Copyright=Copyright © 2021 Sylvain PHILIP
Description=Provides auto-completion for PHP, diagnostics, and other IDE features, working with Phpactor
Loader=python3
Module=phpls_plugin
Name=PHP Language Server Integration
X-Completion-Provider-Languages=php
X-Diagnostic-Provider-Languages=php
X-Formatter-Languages=php
@Benoitlecorre
Benoitlecorre / algo_apb_proper.sql
Last active June 16, 2020 12:09
Code source d'Admission post-bac envoyé par le ministère de l'Education nationale
-- Génération automatique de classements aléatoires en production, pour les FNS
-- ===================================
FUNCTION gen_class_aiea_v1_relatif_grp( o_g_ea_cod_ins IN varchar2, o_g_ti_cod IN number, o_c_gp_cod IN number, o_g_tg_cod IN number, iogin IN varchar2, type_login IN number, mode_dev IN number, confirm IN number, saio IN number, nip IN varchar2, indic IN number, mess_err out varchar2, mess_aff out varchar2)
RETURN number IS
retour number;
X varchar2(2);
dummy number;
dummy2 number;
l_c_gp_fIg_seI c_grp.c_gp_flg_sel%type;