Skip to content

Instantly share code, notes, and snippets.

View endaaman's full-sized avatar
💭
Neovim

Ken Enda endaaman

💭
Neovim
View GitHub Profile
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@phpdude
phpdude / nginx.conf
Last active February 28, 2024 04:36
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@uhfx
uhfx / gist:3922268
Last active July 22, 2023 15:01
Twitter公式/非公式クライアントのコンシューマキー

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@hayajo
hayajo / changelog_en.md
Last active July 19, 2024 05:47
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

#!/usr/bin/env python
"""
This module sets up a video stream from internal or connected webcam using Gstreamer.
You can then take snapshots.
"""
import pygtk, gtk
import pygst
pygst.require("0.10")
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active July 23, 2024 07:09
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
@ryo-murai
ryo-murai / curl-post-json.md
Created March 19, 2015 03:41
curlでJSONをPOSTするの忘れるからかいとく

example json request

POST /v3/get HTTP/1.1
Host: getpocket.com
Content-Type: application/json

{"consumer_key":"1234-abcd1234abcd1234abcd1234",
"access_token":"5678defg-5678-defg-5678-defg56",
"count":"10",
@raccy
raccy / kometalk.rb
Last active December 2, 2015 02:51
Viqo経由でめいちゃんにコメをしゃべって貰おうとしたら、なぜかこうなった。
#!/usr/bin/env ruby
# coding: utf-8
=begin
kometalk.rb
Copyright (c) 2015 IGARASHI Makoto (raccy)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
コマンドラインからの入力文字をOpen JTalkでしゃべってくれます。
実行はすぐに終わって、裏でサーバが立ち上がって、しゃべります。
@saitoha
saitoha / tmux-SIXEL.patch
Created July 14, 2015 16:21
tmux: SIXEL integration (for mlterm / RLogin, not works on XTerm)
diff --git a/input.c b/input.c
index d1ff17f..33fad13 100644
--- a/input.c
+++ b/input.c
@@ -1805,6 +1805,7 @@ input_dcs_dispatch(struct input_ctx *ictx)
{
const char prefix[] = "tmux;";
const u_int prefix_len = (sizeof prefix) - 1;
+ u_char *p;