Skip to content

Instantly share code, notes, and snippets.

@laiso
laiso / gist:1217214
Last active October 29, 2020 18:18
[日記] 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
# 厨2病フレーズだけで記述できるプログラミング言語 のイメージ
何ッ ()
もしも それ が 真実 なの ならば———
これ は 大変なことになるぞ! (いや?)\
まぁ…… いい…
ククク…… 見せてもらおうじゃないか…… ←\
旋律 の 傀儡師 の 実力とやらを! # TODO なぜだ!? 動く!?
@poutyface
poutyface / gist:1223553
Created September 17, 2011 02:25
QEMU: 仮想ボード ARM Cortex-A9 マルチコアで Linux を動かす
モチベーション
---------------
Androidのエミュレータは中でQEMUを使ってる
中で使われているので、Android開発とは直接関係がないけど、
素のQEMUの使い方を知る。
* QEMUの使い方を覚える
* Linuxをエミュレータ環境で動かしてみる
* ARM のクロス環境に慣れてみる
@StuMx
StuMx / streamLoader.js
Created February 27, 2012 20:56
Twitter stream using javascript.
/*
* You have to include oauth.js and sha1.js from here http://oauth.googlecode.com/svn/code/javascript/
* /
var url = "https://userstream.twitter.com/2/user.json";
var accessor = {
token: "",
tokenSecret: "",
consumerKey : "",
consumerSecret: ""
@tkihira
tkihira / profiler.js
Created March 24, 2012 16:00
JavaScript General Profiler
window.Profiler = {
stackFrame: [],
counters: {},
working: false,
listup: function(name, obj, parentName, parentObj, level) {
if(level > 10) {
return;
}
var fullName = parentName? parentName + "." + name: name;
@yewton
yewton / znc-0.206.20120807.diff
Created August 7, 2012 06:21
ZNCのPlaybackをNoticeにする
diff -Naru znc-0.206.orig/Chan.cpp znc-0.206/Chan.cpp
--- znc-0.206.orig/Chan.cpp 2012-04-06 04:25:50.000000000 +0900
+++ znc-0.206/Chan.cpp 2012-08-07 16:31:17.000000000 +0900
@@ -570,7 +570,7 @@
MODULECALL(OnChanBufferStarting(*this, *pUseClient), m_pUser, NULL, bSkipStatusMsg = true);
if (!bSkipStatusMsg) {
- m_pUser->PutUser(":***[email protected] PRIVMSG " + GetName() + " :Buffer Playback...", pUseClient);
+ m_pUser->PutUser(":***[email protected] NOTICE " + GetName() + " :Buffer Playback...", pUseClient);
}
@edvakf
edvakf / smc.c
Created November 10, 2012 01:13
SMC
/*
* Apple System Management Control (SMC) Tool
* Copyright (C) 2006 devnull
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@dergachev
dergachev / pandoc2redmine.sh
Created March 6, 2013 18:31
pandoc2redmine.sh - wrapper script on pandoc to fix textile output for Redmine compatibility
#! /bin/env bash
cat $1 | ruby -pe 'puts " "*20 if $_.match("^```$")' \
| pandoc -f markdown -t textile \
| ruby -r CGI -n -e 'print CGI.unescapeHTML($_);' \
| ruby -ne 'puts $_ unless $_.match(" "*20)' \
| pbcopy
# without spaces, pandoc outputs "bc." for code blocks, which isn't accepted to redmine
# it also annoyingly HTML escapes its pre- block contents
#!/usr/bin/env perl
print r(-1882006324) . ' ' . r(-2062980754) . "\n";
sub r {
my $s = '';
srand(shift);
while (my $r = int(rand(27))) {
$s .= chr(ord('`') + $r);
}
@lorin
lorin / vagrant.py
Created September 25, 2014 21:25
Vagrant dynamic inventory script for Ansible
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys
@ThomasLeister
ThomasLeister / opendkim-postfix-chrooted-systemd
Created August 5, 2017 13:24
OpenDKIM with chrooted Postfix on systemd Systems
If postfix runs in an chrooted environment:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
cleanup unix n - y - 0 cleanup
... opendkim.sock must be placed into /var/spool/postfix. Postfix won't be able to access the socket otherwise.