This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html></html> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Zeit<style id="jsbin-css"> | |
body { | |
font: 16px helvetica, arial, sans-serif; | |
background-color: #eee; | |
margin: 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: #fff; | |
font-size: 16px; | |
font-family: helvetica; | |
} | |
.jwlogo { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- JW Player Library --> | |
<script src="http://jwpsrv.com/library/MCK8hplLEeOY0CIACmOLpg.js"></script> | |
<!-- div for the player --> | |
<div id='playerKXSDPIwKERSv'></div> | |
<!-- Script to display video file in the player div --> | |
<script type='text/javascript'> | |
jwplayer('playerKXSDPIwKERSv').setup({ | |
// URL to the video file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
"n" ) | |
if [ -z $2 ] | |
then | |
echo "Specify an app name" | |
else | |
if [ -d ~/rails/$2 ] | |
then | |
echo "App '$2' exists already" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Dashboard | |
defaults write com.apple.dashboard mcx-disabled -boolean true | |
killall Dashboard | |
# Enable Dashboard | |
defaults write com.apple.dashboard mcx-disabled -boolean false | |
killall Dashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcopy /s /Y C:\Users\Pascal\drive\Projects\karteikarten C:\xampp\htdocs\karteikarten | |
chrome "http://localhost/karteikarten" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911] | |
# Write your code below this line! | |
round_down = Proc.new { |f| f.floor } | |
# Write your code above this line! | |
ints = floats.collect(&round_down) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case var | |
when 1 | |
puts 1 | |
when 2 | |
puts 2 | |
else | |
puts 'none' | |
end | |
case var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
string_AZ = Hash[("a".."z").to_a.zip((1..26).to_a)] | |
symbol_AZ = Hash[(:a..:z).to_a.zip((1..26).to_a)] | |
string_time = Benchmark.realtime do | |
100_000.times { string_AZ["r"] } | |
end | |
symbol_time = Benchmark.realtime do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def alphabetize arr, rev=false | |
if rev | |
arr.sort.reverse | |
else | |
arr.sort | |
end | |
end | |
puts alphabetize ["b","e","a"], true | |
# => ["e","b","a"] |
NewerOlder