This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A { | |
public $m; | |
public function __construct($pdo) { | |
$sql = 'select 1 as m'; | |
$stmt = $pdo->prepare($sql); | |
$stmt->setFetchMode(PDO::FETCH_INTO, $this); | |
$stmt->execute(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class LCG { | |
unsigned long s; | |
static const unsigned long M = 1103515245UL; | |
static const unsigned long A = 12345UL; | |
static const unsigned long B = 2147483647UL; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "A.hpp" | |
#include <iostream> | |
A::A() { } | |
A::~A() { } | |
void A::execute() { } | |
Pool<A> A::merePool(sizeof(A)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CreateObject("Wscript.Shell").Run WScript.Arguments(0),0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
my $source = $ARGV[0]; | |
my $type = $ARGV[1]; | |
my $rules = $ARGV[2]; | |
my $result = `phpmd ${source} ${type} ${rules}`; | |
$result =~ s/^\s+//g; | |
$result =~ s/(:[0-9]+)/$1:/g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
brew install fontforge | |
brew install wget | |
git clone https://github.com/yascentur/Ricty.git Ricty | |
cd Ricty && \ | |
wget http://levien.com/type/myfonts/Inconsolata.otf && \ | |
wget http://iij.dl.sourceforge.jp/mix-mplus-ipa/56156/migu-1m-20120411-2.zip && \ | |
unzip migu-1m-20120411-2.zip && \ | |
cd migu-1m-20120411-2 && \ | |
cp migu-1m-*.ttf ../ && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'formula' | |
class Cmigemo < Formula | |
url 'http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip' | |
homepage 'http://www.kaoriya.net/software/cmigemo' | |
sha1 '25e279c56d3a8f1e82cbfb3526d1b38742d1d66c' | |
depends_on 'nkf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; key-chord | |
(require 'key-chord) | |
(key-chord-mode 1) | |
(devar key-chord-bindings | |
'(("hf" . describe-function) | |
("hb" . describe-bindings) | |
("hv" . describe-variable) | |
("rs" . replace-string) | |
("rp" . replace-regexp) | |
("a;" . goto-line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naru znc-0.206.orig/Client.cpp znc-0.206/Client.cpp | |
--- znc-0.206.orig/Client.cpp 2012-07-27 14:52:48.000000000 +0900 | |
+++ znc-0.206/Client.cpp 2012-07-27 14:56:31.000000000 +0900 | |
@@ -430,7 +430,7 @@ | |
CChan* pChan = m_pUser->FindChan(sTarget); | |
if ((pChan) && (pChan->KeepBuffer())) { | |
- pChan->AddBuffer(":" + GetNickMask() + " PRIVMSG " + sTarget + " :" + m_pUser->AddTimestamp(sMsg)); | |
+ pChan->AddBuffer(":" + GetNickMask() + " NOTICE " + sTarget + " :" + m_pUser->AddTimestamp(sMsg)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
OlderNewer