This file contains hidden or 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
| import unittest, os, os.path, sys | |
| import tornado.database | |
| import tornado.options | |
| from tornado.options import options | |
| APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
| sys.path.append(os.path.join(APP_ROOT, '..')) | |
| # import your model module | |
| import your.model as model |
This file contains hidden or 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
| /* We're having a Read/Unread War in a shared Google Apps mailbox. | |
| * I need to figure out how to put this on like a 10 second trigger... | |
| */ | |
| function whatthe() { | |
| var threads = GmailApp.getInboxThreads(0, 20); | |
| GmailApp.markThreadsRead(threads); | |
| } |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Poke everyone! | |
| // @description Pokes everyone you specify. | |
| // @author Sebastian Paaske Tørholm | |
| // @include http://*.facebook.com/* | |
| // @include https://*.facebook.com/* | |
| // @match http://*.facebook.com/* | |
| // @match https://*.facebook.com/* | |
| // @require http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js | |
| // @version 1.0 |
This file contains hidden or 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
| const unsigned char* buf=boost::asio::buffer_cast<const unsigned char*>(inbuf_.data()); | |
| std::cout << &inbuf_; |
This file contains hidden or 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
| Start: | |
| sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist | |
| Stop: | |
| sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist |
This file contains hidden or 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
| <configResolveClass cookie='1326408068/5e023770-a7d0-4a98-88cb-f0db0357109f' response='yes' classId='computeBlade'> | |
| <outConfigs> | |
| <computeBlade adminPower='policy' adminState='in-service' assignedToDn='org-root/ls-11' association='associated' availability='unavailable' availableMemory='8192' chassisId='1' checkPoint='discovered' connPath='A,B' connStatus='A,B' descr='' discovery='complete' dn='sys/chassis-1/blade-1' fltAggr='0' fsmDescr='' fsmFlags='' fsmPrev='TurnupSuccess' fsmProgr='100' fsmRmtInvErrCode='none' fsmRmtInvErrDescr='' fsmRmtInvRslt='' fsmStageDescr='' fsmStamp='2012-01-10T20:19:23.463' fsmStatus='nop' fsmTry='0' intId='32992' lc='undiscovered' lcTs='1970-01-01T01:00:00.000' lowVoltageMemory='not-applicable' managingInst='A' memorySpeed='not-applicable' mfgTime='not-applicable' model='N20-B6620-1' name='' numOfAdaptors='1' numOfCores='8' numOfCoresEnabled='8' numOfCpus='2' numOfEthHostIfs='3' numOfFcHostIfs='0' numOfThreads='16' operPower='on' operQualifier='' operState='ok' operability='o |
This file contains hidden or 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
| class child | |
| { | |
| public: | |
| child(char *cmd) | |
| { | |
| // Sec attr for the named pipe | |
| SECURITY_ATTRIBUTES sa; | |
| ZeroMemory(&sa,sizeof(sa)); | |
| sa.nLength = sizeof(sa); | |
| sa.lpSecurityDescriptor = NULL; |
This file contains hidden or 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
| module UnfuckUnicode | |
| def byteordermarkify(old,new) | |
| File.open(new, 'w') do |out| | |
| out << "\xEF\xBB\xBF" | |
| File.foreach(old) do |line| | |
| out << line | |
| end | |
| end | |
| end | |
| end |
This file contains hidden or 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 <stdio.h> | |
| #include <sys/stat.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| typedef struct { | |
| char *name; | |
| FILE *file; | |
| long inode; |
This file contains hidden or 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/bash | |
| for cookbook in $(find * -type d -maxdepth 0); do | |
| git clone ./ ../${cookbook} | |
| cd ../${cookbook} | |
| git remote rm origin | |
| git filter-branch --subdirectory-filter ${cookbook} -- --all | |
| git gc --aggressive | |
| done |
OlderNewer