Skip to content

Instantly share code, notes, and snippets.

View LordAro's full-sized avatar

Charles Pigott LordAro

View GitHub Profile
diff --git a/.clang-format b/.clang-format
new file mode 100644
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,46 @@
+---
+# BasedOnStyle: Google
+AccessModifierOffset: -1
+ConstructorInitializerIndentWidth: 4
+AlignEscapedNewlinesLeft: true

Keybase proof

I hereby claim:

  • I am LordAro on github.
  • I am lordaro (https://keybase.io/lordaro) on keybase.
  • I have a public key whose fingerprint is DD8A 3C3E F207 D9C6 1501 BD47 2D15 989C 8B3C D13F

To claim this, I am signing this object:

@LordAro
LordAro / convert_array.py
Last active August 29, 2015 14:00
PHP array(...) to [...]
#!/usr/bin/env python3
import os
import sys
import mmap
def deleteFromMmap(f, mmapfile, start, end):
length = end - start
size = len(mmapfile)
newsize = size - length
#!/usr/bin/env python2
import cPickle as pickle
class Member:
def __init__(self, firstname, surname, postcode, owned_items):
self.firstname = firstname
self.surname = surname
self.postcode = postcode
self.owned_items = owned_items
@LordAro
LordAro / Autopoke.js
Last active August 29, 2015 14:03
I did a bad thing....
// ==UserScript==
// @name FB Autopoker
// @version 0.1
// @description enter something useful
// @match https://www.facebook.com/pokes/*
// @copyright 2014, Me
// ==/UserScript==
function autoPoke() {
a = document.getElementsByClassName("_42ft _4jy0 _4jy3 _4jy1 selected");
#!/usr/bin/env python3
from bottle import route, run, post, request
from subprocess import call
import _thread as thread
@route("/~lordaro/hook")
def hook():
with open("test.txt", "r") as myfile:
return myfile.read()
#include <stdio.h>
#include <signal.h>
static void func(int sig)
{
printf("lol\n");
}
int main()
{
import csv
import random
import re
import requests
from csbot.plugin import Plugin
from csbot.util import nick, simple_http_get
def get_title(issue_id):
try:
#include <algorithm>
#include <iostream>
int main()
{
std::vector<int> nums(10);
std::iota(nums.begin(), nums.end(), 1);
do {
if (std::accumulate(nums.begin() + 1, nums.end(), 0) == 46) {
for (const auto &i : nums) {
@LordAro
LordAro / search
Last active August 29, 2015 14:15