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
@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 May 3, 2024 20:54
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 March 22, 2024 08:54
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"
@Songmu
Songmu / .slate.js
Last active December 14, 2015 15:39
S.on('appActivated', function (event, app) {
S.log('appActivated:' + app.name());
});
@siongui
siongui / draggable.js
Created February 17, 2013 00:40
AngularJS draggable element (position must be absolute)
/**
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js
* @see http://docs.angularjs.org/guide/compiler
*/
angular.module('draggableModule', []).
directive('draggable', ['$document' , function($document) {
return {
restrict: 'A',
link: function(scope, elm, attrs) {