Skip to content

Instantly share code, notes, and snippets.

View nilsding's full-sized avatar
🐾
fox paws

Georg Gadinger nilsding

🐾
fox paws
View GitHub Profile
@nilsding
nilsding / curtain.c
Created March 10, 2013 20:54
I made this for @codepony. Pretty useless if you don't know what it is useful for.
#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 April 9, 2013 17:04
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.
<?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();
#!/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 February 29, 2016 13:32
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)
#!/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 September 26, 2013 19:16
Annoy your Twitter followers by tweeting the lyrics to "99 Bottles of Beer".
#!/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 October 30, 2013 22:19
The source code behind @nilsplaying.
#!/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.
@nilsding
nilsding / gist:9573182
Last active August 29, 2015 13:57
whois
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 August 29, 2015 14:00
Twoffein Sourcecode
# Copyright (c) 2014 Twoffein.com
# Do not copy or redistribute
class StaticController < ApplicationController
def index
end
def imprint
end
@nilsding
nilsding / .bashrc
Last active April 23, 2017 15:04
The Windows user friendly .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