Skip to content

Instantly share code, notes, and snippets.

Chris beakr

Block or report user

Report or block beakr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tapirsay.py
#!/usr/bin/env python
from __future__ import print_function
import sys
def make_speech_bubble(message):
def times_msg_size(string): return (string * len(message))
print(' _' + times_msg_size('_') + '_')
print('/ ' + times_msg_size(' ') + ' \\')
print('| ' + message + ' |')
print('\\_' + times_msg_size('_') + '_/')
@beakr
beakr / vocab.txt
Created Dec 21, 2014
Popular vocabulary used on 2chan (translated to English). Source: http://services.4-ch.net/2chportal/
View vocab.txt
* AA — Abbrev for "ASCII Art", actually JIS art.
* aborn あぼーん — Post deleted. Occasionally also 〜する "to administratively delete a post".
* age — To reply to a thread and thus bump a thread to the top of the board. From 上げる. Written in romaji but inflected like a verb, e.g. ageろ "let's age".
* appu うp — "Upload please!". Like "zOMG TORRENT PLZ" but less annoying.
* arashi 荒し — Troll.
* burakura ブラクラ — Browser crusher. Things or people who post things which break web browsers.
* chūbō 厨房 — Posters who don't bother to read the rules, flamers, spammers. From kanji misconversion of 中坊 "middle school kid", an abbrev for 中学坊主 or 中学坊や. 坊主 is an everyday slang term for "kid", from the short haircuts of young boys and bald heads of Buddhist priests.
* denpa 電波 — Literally "radio waves". Songs and similar things which get stuck in your head, e.g. マイヤヒ.
* desu tane デス種 — Abbrev for Gundam Seed Destiny.
* DQN ドキュン — Retard, asshole, jerk, troll. Also ドキュソ.
@beakr
beakr / wafw.py
Last active Aug 29, 2015
A wrapper script for Waf, just like Gradle.
View wafw.py
#!/usr/bin/env python
# This Python script allows you to create tiny custom Waf distributions
# for each project you have. It's very similar to Gradle's wrapper scripts.
# Your mini Waf distribution can be customized using the variables at the top
# of the script.
from __future__ import print_function
import os
import sys
@beakr
beakr / gist:b82dd823c0d339777db7
Created Oct 2, 2014
Equivelent of the 'which' UNIX command in Powershell.
View gist:b82dd823c0d339777db7
(Get-Command exe).Path
View Zip.cpp
void Zip::Open(const char * file)
{
int error = 0;
// Allocate a buffer that holds the error message string from
// zip_error_to_str.
char buffer[250];
// Open the zip file. Essentially it writes data to the `z' struct
// that holds all the zip file data.
z = zip_open(file, ZIP_CREATE, &error);
@beakr
beakr / Archive.cpp
Created Sep 24, 2014
Found a bunch of functions around the web and stuffed them into a little thing that does operations on GZip files.
View Archive.cpp
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <zlib.h>
#include <zconf.h>
using namespace std;
void compress(string filename, string data)
{
View compress.c
#include <stdio.h>
#include <string.h>
#include <zlib.h>
int main()
{
const char * dat = "Hello world!";
gzFile * f = (gzFile *)gzopen("archive.gz", "wb");
gzwrite(f, dat, strlen(dat));
gzclose(f);
View Decompress.cpp
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include "zlib.h"
#include "zconf.h"
using namespace std;
bool gzipInflate( const std::string& compressedBytes, std::string& uncompressedBytes ) {
if ( compressedBytes.size() == 0 ) {
@beakr
beakr / arysize.cpp
Created Sep 17, 2014
Chromium's amazing C++ macro for sizing (standard C) arrays.
View arysize.cpp
template <typename T, size_t N>
char (&ArraySizeHelper(T (&array)[N]))[N];
#define arysize(array) (sizeof(ArraySizeHelper(array)))
@beakr
beakr / cinst.bat
Last active Aug 29, 2015
Batch script for installing various Chocolatey packages.
View cinst.bat
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Basic apps I use
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Best web browser IMO
cinst GoogleChrome
:: For calling/contacting people
cinst Skype
You can’t perform that action at this time.