Skip to content

Instantly share code, notes, and snippets.

@drunkensouljah
drunkensouljah / tagesbild.js
Created November 11, 2015 22:03
Jeden Tag der Woche ein anderes Bild anzeigen lassen
<script type="text/javascript"><!--
var imlocation = "images/";
function ImageArray (n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
image = new ImageArray(7)
image[0] = 'Sonntag.gif'
@drunkensouljah
drunkensouljah / begruessung.php
Created November 12, 2015 21:45
Tageszeitabhängige Begrüßung auf der Webseite
<?php
if(date("G") < 12) {$a="Guten Morgen";}
if(date("G") <= 18 && date("G") >= 12) {$a="Guten Tag";}
if(date("G") >= 19) {$a="Guten Abend";}
echo $a;
?>
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
{"users":[
{
"firstName":"Horst",
"lastName":"Bierwurst",
"joined": {
"month":"January",
"day":12,
"year":2016
}
},
@drunkensouljah
drunkensouljah / data.json
Created February 7, 2016 00:24
test json
[{"User_Name":"John Doe","score":"10","team":"1"},{"User_Name":"Jane Smith","score":"15","team":"2"},{"User_Name":"Chuck Berry","score":"12","team":"2"}]
@drunkensouljah
drunkensouljah / README.md
Created February 13, 2016 17:59 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@drunkensouljah
drunkensouljah / 404
Created February 13, 2016 21:15
error
\ SORRY /
\ /
\ This page does /
] not exist yet. [ ,'|
] [ / |
]___ ___[ ,' |
] ]\ /[ [ |: |
] ] \ / [ [ |: |
] ] ] [ [ [ |: |
javascript:(function({
var INSTAPAPER=true,w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt="";
tmplt="From ["+pageTitle+"]("+pageUri+"):\n\n";
if(pageSelectedTxt!="") {
pageSelectedTxt=">%20"+pageSelectedTxt;
pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n");
pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20");
w.location.href="nvalt://make/?txt="+encodeURIComponent(tmplt+pageSelectedTxt)+"&title="+encodeURIComponent(pageTitle)
}
else {
@drunkensouljah
drunkensouljah / .zshrc
Created June 7, 2016 19:05 — forked from tansengming/.zshrc
.zshrc
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="gallois"
setopt HIST_FIND_NO_DUPS
setopt histignorealldups
alias x='exit'
alias desk='cd ~/Desktop'
alias rm='grm -v'
@drunkensouljah
drunkensouljah / Top Apps.py
Created June 15, 2016 17:02 — forked from omz/Top Apps.py
Top Apps
# Shows a list of the 10 top paid apps on the App Store.
print 'Loading...'
import feedparser
import console
print 'Fetching Feed...'
feed = feedparser.parse('http://itunes.apple.com/us/rss/toppaidapplications/limit=10/xml')
entries = feed['entries']