Skip to content

Instantly share code, notes, and snippets.

View Ignition's full-sized avatar

Gareth Andrew Lloyd Ignition

View GitHub Profile
@Ignition
Ignition / eurovision2023.cypherl
Last active May 18, 2023 13:43
eurovision2023
CREATE (:Country {name: "Croatia"});
CREATE (:Country {name: "Belgium"});
CREATE (:Country {name: "Czech Republic"});
CREATE (:Country {name: "Sweden"});
CREATE (:Country {name: "Greece"});
CREATE (:Country {name: "Malta"});
CREATE (:Country {name: "Albania"});
CREATE (:Country {name: "Latvia"});
CREATE (:Country {name: "United Kingdom"});
CREATE (:Country {name: "Italy"});
@Ignition
Ignition / keybase.md
Created October 22, 2016 10:41
keybase.md

Keybase proof

I hereby claim:

  • I am Ignition on github.
  • I am ignition (https://keybase.io/ignition) on keybase.
  • I have a public key whose fingerprint is 3369 FEC8 F029 70BC 3F4C CF92 76F8 B186 01EA 5F21

To claim this, I am signing this object:

@Ignition
Ignition / 10x10puzzle.txt
Last active December 28, 2015 15:16
10 x 10 puzzle
Rules: fill a 10x10 grid using the following rules
1) each sqaure contains one number
2) each number from 1 to 100 is written once
3) 1 can start anywhere
4) position of the n+1th number either
- 3 squares away along row/column from the nth square
- 2 squares away along a diagonal from the nth square
eg.
_ _ _ ? _ _ _
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-dispatch'
Plugin 'tpope/vim-obsession'
Plugin 'tpope/vim-sleuth'
#include <iostream>
#include <functional>
#include <cstdio>
#include <ctime>
#include "Memoize.h"
using namespace std;
int main()
@Ignition
Ignition / Instructions
Last active August 29, 2015 14:02
Configuration for Networking Computer Science, University of York
For Ubuntu/Debian, make sure your machine has its mac address registered so I can be put on the correct subnet. Ask CS support.
apt-get install ssh-client krb5-user libpam-krb5
@Ignition
Ignition / gist:4155787
Created November 27, 2012 17:41
Using Oliver Kowalke's coroutines headers which will soon be in Boost
//https://gitorious.org/boost-dev/boost-dev, coroutine branch
//g++ -I path/to/boost-dev -std=c++11 code.cpp -static -L path/to/boost-dev/stage/lib/ -lboost_context
#include <boost/coroutine/all.hpp>
#include <boost/bind.hpp>
#include <boost/range.hpp>
#include <iostream>
#include <vector>
using namespace std;
@Ignition
Ignition / future.cpp
Created October 29, 2012 14:58
Example of using future C++11
#include <iostream>
#include <future>
#include <thread>
int main()
{
// future from a packaged_task
std::packaged_task<int()> task([](){ return 7; }); // wrap the function
std::future<int> f1 = task.get_future(); // get a future
std::thread(std::move(task)).detach(); // launch on a thread
@Ignition
Ignition / text.c
Created January 23, 2012 23:14
Obfusticated
#include <stdio.h>
#define f(v,k) (((v << 2) | (~v >> 6)) ^ k)
int main(int argc, char *argv[]){
unsigned char c = 0x01, v, p[17] = {0x00}, k = 0x00, * t,
z[] = {0x87, 0xA3, 0x85, 0x96, 0x81, 0x90, 0x8C, 0xC4, 0xA4,
0xCA, 0xC5, 0xA9, 0x88, 0x8B, 0x9D, 0x80, 0xEE};
do{
t = z;
while (!((t - z) & 0x10)){
v = f(*t, k) ^ *((t++) + 1);
@Ignition
Ignition / openmp-test.cpp
Created May 6, 2011 01:28
Test for Zena
#include <omp.h>
#include <cstdlib>
#include <iostream>
#include <list>
#include <time.h>
bool ompon = false;
std::list<int> intList;
const int N = 1000;