Skip to content

Instantly share code, notes, and snippets.

Avatar
🐾
obey the laws rub my paws

Georg Gadinger nilsding

🐾
obey the laws rub my paws
View GitHub Profile
@nilsding
nilsding / curtain.c
Created Mar 10, 2013
I made this for @codepony. Pretty useless if you don't know what it is useful for.
View curtain.c
#include <stdio.h>
#include <string.h>
void reverse(char* s)
{
int i, j;
char c;
for (i = 0, j = strlen(s) - 1; i < j; i++, j--)
{
c = s[i];
@nilsding
nilsding / api.php
Created Apr 9, 2013
A small API for lilURL. Place in the same folder as your index.php. It uses a HTTP POST request for the long url and outputs a JSON string as response.
View api.php
<?php
/* api.php - A small API hack for lilURL
* Made in 2013 by @nilsding
*/
require_once 'includes/conf.php';
require_once 'includes/lilurl.php';
$lilurl = new lilURL();
View whatever.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# whatever.py
# Copyright © 2013 nilsding <nilsding@rrerr.net>
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
# to run this you need:
@nilsding
nilsding / autoblock.py
Last active Feb 29, 2016
autoblock.py is a script that automagically blocks new followers if several conditions are met (account is not older than x days, has not at least x followers, has not reached x tweets)
View autoblock.py
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# autoblock.py
# Automagically blocks new followers if their account is not older than x
# days, has not reached a minimum number of tweets and has not more than x
# followers.
#
# Dependencies: - Tweepy
# - simplejson
@nilsding
nilsding / bottles_of_beer.py
Created Sep 26, 2013
Annoy your Twitter followers by tweeting the lyrics to "99 Bottles of Beer".
View bottles_of_beer.py
#!/usr/bin/python2
# bottles_of_beer.py
# Annoy your Twitter followers by tweeting the lyrics to "99 Bottles of Beer".
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# nilsding <nilsding@nilsding.org> wrote this file. As long as you retain this
# notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy me a beer in return.
@nilsding
nilsding / tweet_np.py
Created Oct 30, 2013
The source code behind @nilsplaying.
View tweet_np.py
#!/usr/bin/python2
#
# tweet_np.py
#
# Copyright (C) 2013 nilsding
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
View gist:9573182
nilsding@FurBSD:~ % whois microsoft.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
MICROSOFT.COM.ZZZZZZZZZZZZZZZZZZZZZZ.IS.A.GREAT.COMPANY.ITREBAL.COM
MICROSOFT.COM.ZZZZZZZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COM
@nilsding
nilsding / static_controller.rb
Last active Aug 29, 2015
Twoffein Sourcecode
View static_controller.rb
# Copyright (c) 2014 Twoffein.com
# Do not copy or redistribute
class StaticController < ApplicationController
def index
end
def imprint
end
@nilsding
nilsding / .bashrc
Last active Apr 23, 2017
The Windows user friendly .bashrc™
View .bashrc
# The Windows user friendly .bashrc™
# (c) 2013-2014 nilsding
# License: public domain
# Feel free to fuck around with this.
# Test for an interactive shell.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi