Skip to content

Instantly share code, notes, and snippets.

View jnslxndr's full-sized avatar

jens alexander jnslxndr

  • Baltic Sea
View GitHub Profile
@jnslxndr
jnslxndr / randoms.php
Created July 28, 2011 12:02
Make a fake/random password
/**
* Fake Password / Random Password
*/
function makeRandPass($length=5){
$out = "";
while($length-->0){
$out.=chr(rand(ord('A'),ord('z')));
}
return $out;
#!/usr/bin/env ruby
# ==========================================================================
# = Use this to update to the latest version of Chromium from the buildbot
# = archives. This is for OS X only, fork and adapt to your needs, if on a
# = different system.
# =
# = Copyleft license with no warranty at all, jens alexander ewald, 2011
# ==========================================================================
require "open-uri"
@jnslxndr
jnslxndr / html.html
Created August 30, 2011 06:27
für lukas
<div class="search">
<form method="get" id="searchform" action="http://194.95.111.57/~ideblog">
<fieldset>
<input name="s" type="text" onfocus="if(this.value=='Search') this.value='';" onblur="if(this.value=='') this.value='Search';" value="Search">
<button type="submit"></button>
</fieldset>
</form>
<!-- nur diese zeile: -->
@jnslxndr
jnslxndr / urlRefresher.scpt
Created September 30, 2011 14:20
open location in current Chromium window and set to fullscreen
on run argv
tell application "Chromium"
activate
set theURL to "http://" & item 1 of argv
if (count of windows) is equal to 0 then
tell application "System Events"
keystroke "n" using {command down}
end tell
@jnslxndr
jnslxndr / defertest.coffee
Created October 7, 2011 09:08
simple defer in coffee
# use a simple defer
defer = (func,args...) -> setTimeout func.apply(null, args), 1
# test defer
greet = (names...) ->
lastname = names.pop() if names.length > 2
names = names.join ", "
names += " and #{lastname}" if lastname
console.log "Hello #{names}!"
@jnslxndr
jnslxndr / LukasScript.js
Created December 1, 2011 10:06
Loop through divs by scrolling to them
$(document).ready(function() {
// Verhindere das Kontextmenü
$('body').bind('contextmenu',function(e) {e.preventDefault();});
// Ein paar Variablen
var slides = $('body > div.content');
var counter = 0;
var num_slides = slides.size();
$(document).bind('mousedown',function(e) {
@jnslxndr
jnslxndr / ArduinoLionFix.scpt
Created December 1, 2011 20:39
Fix the serial port in use issue for Java/Arduino on OS X Lion.
--- Fix the Arduino Serial Port in use Issue on OS X Lion
--- copyleft jens alexander ewald, ififelse.net
--- based on a google search with the keywords:
--- "osx lion arduino port already in use"
--- Credit also to this bolg entry: http://marcosc.com/2011/10/arduino-java-error-serial-port-already-in-use/
--- Download a compiled version here: http://ififelse.net/get/ArduinoLionFix.zip
try
@jnslxndr
jnslxndr / SimpleJsonStorage.rb
Created December 16, 2011 22:17
Simple JSON Storage for Middleman Demos
# ===========================================
# = Simple JSON to File Storage Feature =
# = =
# = THIS IS FOR DEMO PURPOSE ONLY!!! =
# = =
# = DO NOT USE IN PRODUCTION CODE! =
# = =
# = (c) Copyleft 2011 jens alexander ewald. =
# = http://ififelse.net | github.com/jens-a-e =
# ===========================================
@jnslxndr
jnslxndr / dabblet.css
Created January 18, 2012 15:03
[Teil 2 - CSS]
/*
[Teil 2 - CSS]
Beispiele zum Start
*/
/** SELEKTOR Beispiele **/
/*
Der einfachste Selektor ist der Tag-Name.
"html" selektiert alle Elemente in der <html></html>
Node des Dokumentes - also alle :)
/*
Hi, Christoph, sorry for english comments...
Entspricht es deiner Vorstellung?
"Durchklicken" kann auch gehen, aber da bin ich gerade
zu faul...
Wie zu benutzen: Auf eine Jquery Site gehen, die Console öffnen
und dann folgende Zeile pasten + Enter: