Skip to content

Instantly share code, notes, and snippets.

View peccu's full-sized avatar
🦉
Information is the network

peccu peccu

🦉
Information is the network
View GitHub Profile
@henryhamon
henryhamon / phoenixc9.sh
Created August 15, 2016 12:52
shell to install Erlang, Elixir and Phoenix on C9.io
# For some reason, installing Elixir tries to remove this file
# and if it doesn't exist, Elixir won't install. So, we create it.
sudo touch /etc/init.d/couchdb
# Standard Ubuntu Elixir installation instructions
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
rm erlang-solutions_1.0_all.deb
sudo apt-get update
@ahromis
ahromis / docker-compose.yml
Last active January 21, 2025 12:39
Gogs docker-compose.yml
version: '2'
services:
postgres:
image: postgres:9.5
restart: always
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=gogs"
volumes:
@pbosetti
pbosetti / edison-x-compile.md
Last active October 17, 2016 07:05
Intel edison cross compiling tricks on OS X
@ghiden
ghiden / bluebird-csv.js
Created June 15, 2015 09:07
To promisify csv-parse using Bluebird
"use strict";
var fs= require('fs');
var Promise = require('bluebird');
var parse= Promise.promisify(require('csv-parse'));
var file = fs.readFileSync('test.csv', 'utf8');
var headerKeys;
var options ={
trim: true,
@kiwanami
kiwanami / jsdoc.yasnippet
Last active December 17, 2016 04:27
JS の function の定義から、ある程度自動的に内容を拾ってjsdoc用のコメントをつくる yasnippet
# -*- mode: snippet -*-
# name: jsdoc comment
# key: doc
# --
/**
* $0
`(save-excursion
(let* ((pos-fun (re-search-forward "\\<function\\s-*(\\([^)]*\\))"))
(argstr (and pos-fun (match-string 1)))
(args (and pos-fun (split-string argstr ",\\s-*"))))
@spoike
spoike / svg_paths_cheatsheet.md
Last active July 31, 2025 09:26
Cheatsheet for SVG paths

Cheatsheet for SVG Path Data

Straight line commands

+------------+-------------------+--------+
| *M* or *m* | moveto            | (x y)+ |
+------------+-------------------+--------+
| *Z* or *z* | close path        | (none) |
+------------+-------------------+--------+
@soheilhy
soheilhy / nginxproxy.md
Last active April 11, 2026 16:15
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@adrienne
adrienne / quixCommands.txt
Last active August 30, 2023 22:13
Commands for the truly awesome Quix bookmarklet
> Killing the default commands
> Note that ALL spaces must be removed from bookmarklets, and %-encoded characters must be changed back to normal.
#kill-defaults
> Begin new commands (many copied from original Quix)
@Searching
ama https://www.amazon.com/s/?field-keywords=%s Amazon Search
\documentclass[a4paper]{jsarticle}
\newcount\xxCntA
\newcount\xxCntB
\newcount\xxCntC
%% 例のMJDなアレ
\def\calcJulian#1#2#3#4{%
\xxCntA=#2\relax \xxCntB=#3\relax
\ifnum\xxCntA<1 \xxCntA=1 \fi
\ifnum\xxCntB<1 \xxCntB=1 \fi
\ifnum\xxCntB<3 \advance\xxCntB12 \advance\xxCntA-1 \fi
git config --global alias.his "log --pretty='format:%C(yellow)%h%Creset %C(magenta)%<(22,trunc)%cd%Creset %><(11,trunc)%C(black bold)%ar%Creset | %Cgreen%<(10)%an%Creset | %<(130,trunc)%s %Cred%<(45,trunc)%d%Creset' --date=iso --all -n 15"