Skip to content

Instantly share code, notes, and snippets.

View neanias's full-sized avatar

William Mathewson neanias

View GitHub Profile
# use zsh instead of bash
case $- in
*i*)
if [ $(which zsh 2>/dev/null) ]; then
export SHELL=$(which zsh)
export BASH=""
exec zsh
fi
esac
> URI.regexp
=> /
([a-zA-Z][\-+.a-zA-Z\d]*): (?# 1: scheme)
(?:
((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*) (?# 2: opaque)
|
(?:(?:
\/\/(?:
(?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)? (?# 3: userinfo)
(?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
Joe Root, who art in heaven,
Innuendo be thy name,
Thy rootometer come,
Thy will get scores in tests,
In ODIs and twenty20.
! Undefined control sequence.
\MT@clist@function #1->\define@key
{MTC}{#1}[]{\edef \@tempb {\@nameuse {MT@...
l.1320 }
#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) {
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++) {
@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..."
@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
[{
"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": "",

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: