Skip to content

Instantly share code, notes, and snippets.

View neanias's full-sized avatar

William Mathewson neanias

View GitHub Profile
@neanias
neanias / restaurants-queries.txt
Created March 4, 2015 11:25
Answers to XPath queries
/ > cat //address
-------
<address>27 Marshall Street, Edinburgh, EH8 9BJ</address>
-------
<address>26 Potterow, Edinburgh, EH8 9BT</address>
-------
<address>7 Nicolson Square, Edinburgh, EH8 9BH</address>
-------
<address>55 West Nicolson Street, Edinburgh, EH8 9DB</address>
-------
781 old man [#68388-#69168]
621 young lady [#112350-#112970]
575 old gentleman [#67050-#67624]
473 young man [#113014-#113486]
422 young gentleman [#111512-#111933]
396 old lady [#67925-#68320]
309 old woman [#70055-#70363]
283 long time [#54675-#54957]
253 last night [#46894-#47146]
241 great deal [#35038-#35278]
@neanias
neanias / gist:057348c63f6ea5c4b0b2
Created March 17, 2015 13:32
President Application blurb
I am a first year Computer Science student. I believe I am suitable as I am an active member of CompSoc, a regular face at TARDIS pub
meetings as well as being on the CompSoc IRC. I have thoroughly enjoyed being a member of CompSoc this year and so I would love to be
able to take on this fantastic society to even greater heights. My aims would be to try and keep alive the CompSoc culture that we
all know and love whilst also trying to expand the society and keep it being something that everyone can take part in.
I would like to have closer ties with Hoppers and Prewired, with perhaps making them SIGs within CompSoc if they are interested. In
relation to this, I would like to also try and establish connection to similar societies such as GameDevSoc and MathSoc, as well as
computing societies at other universities.
Having talked to some members of the society, I believe we should have more non-alcohol dependent socials; some ideas for this include
➜ yukibot git:(master) cabal install --only-dependencies
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: yukibot-0.0.0.1 (user goal)
next goal: base (dependency of yukibot-0.0.0.1)
rejecting: base-4.5.0.0/installed-40b... (conflict: yukibot => base>=4.7 &&
<5)
rejecting: base-4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0,
4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0,
4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires installed instance)

Keybase proof

I hereby claim:

  • I am neanias on github.
  • I am neanias (https://keybase.io/neanias) on keybase.
  • I have a public key whose fingerprint is F65D 1E77 2621 604C 5F2E 7C82 F231 9A15 7566 3EB8

To claim this, I am signing this object:

[{
"modid": "LetsModReboot",
"name": "Let's Mod Reboot",
"description": "Learning to mod Minecraft using Pahimar's guide",
"version": "1.0",
"mcversion": "1.7.10",
"url": "https://github.com/neanias/LetsMod",
"updateUrl": "",
"authorList": ["neanias"],
"credits": "",
@neanias
neanias / gist:d53e585b27ebc29b5afd
Last active September 17, 2015 15:44
IRC post
Hey, peeps!
As I mentioned in the initial lecture for the Freshers, we have an (well, many) IRC chatroom amongst other cool stuff! IRC is an old school communication platform where many of the best programmers still hang out, us included of course. I'm neanias on IRC. Here are some links:
IRC: imaginarynet#compsoc (There's also freenode#compsoc-uk)
http://imaginarynet.uk/
Slack: (This is restricted to .ed.ac.uk email addresses.)
https://compsoc.slack.com
@neanias
neanias / fresh_setup
Last active February 26, 2024 17:11
[UNMAINTAINED] Portable neovim setup
#!/bin/bash
cd ~
echo "Linking .nvimrc into home directory (~)"
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME=~/.config
fi
if [ ! -d $XDG_CONFIG_HOME/nvim ]; then
echo "Creating $XDG_CONFIG_HOME/nvim..."
int n;
int **array;
n = ...;
int i, j;
array = (int **) malloc(n*sizeof(int *));
// iterate over rows
for (i = 0; i < n; i++) {
array[i] = (int *) malloc(n*sizeof(int));
for (j = 0; j < i; j++) {
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int is_palindrome(char* word)
{
int length = strlen(word);
for (int i = 0; i < length; ++i) {
for (int j = (length - 1); j > i; --j) {