This file contains hidden or 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 'rubygems' | |
require 'mechanize' | |
a = Mechanize.new { |agent| | |
agent.user_agent_alias = 'Mac Safari' | |
} | |
a.get('http://amazon.de/') do |page| | |
login_page = a.click(page.link_with(:text => 'Melden Sie sich an')) |
This file contains hidden or 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
export PROJECT_DIRECTORY="/Users/pwaldhauer/Dropbox/dev/Tests/" | |
function spawn_project { | |
if [ -z $2 ] | |
then | |
echo "You need a project name!" | |
return | |
fi | |
if [ $1 = "node" ] |
This file contains hidden or 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
import sublime, sublime_plugin | |
BLOCKLEN = 4 | |
class TypeFileOutCommand(sublime_plugin.TextCommand): | |
def nextchar(self): | |
if self.body: | |
totype = [] | |
while 1: | |
try: |
This file contains hidden or 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
var casper = require('casper').create({ | |
pageSettings: { | |
loadImages: false, | |
loadPlugins: false | |
}, | |
logLevel: "info", | |
verbose: true | |
}); | |
casper.start('https://kreditkarten-banking.lbb.de/Amazon/cas/dispatch.do?bt_PRELON=do&ref=1200_AMAZON&service=COS', function() { |
This file contains hidden or 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
x=1; for i in *jpg; do counter=$(printf %03d $x); ln "$i" /tmp/aaa/img"$counter".jpg; x=$(($x+1)); done | |
ffmpeg -f image2 -framerate 25 -pattern_type sequence -r 10 -i img%03d.jpg -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p /Users/pwaldhauer/test.mp4 |
This file contains hidden or 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 | |
echo "MP4" | |
#ffmpeg -i $1 -vcodec libx264 -vprofile slow -vprofile baseline -b:v 1500k -b:a 64k -g 30 $1.mp4 | |
ffmpeg -i $1 -vcodec libx264 -vprofile slow -vprofile baseline -b:v 1500k -an -g 30 $1.mp4 | |
echo "webm (VP8 / Vorbis)" | |
#ffmpeg -i $1 -b:v 1500k -b:a 64k -vcodec libvpx -acodec libvorbis -f webm -g 30 $1.webm | |
ffmpeg -i $1 -b:v 1500k -b:a 64k -vcodec libvpx -an -f webm -g 30 $1.webm |
This file contains hidden or 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
- (void)viewWillLayoutSubviews { | |
[super viewWillLayoutSubviews]; | |
self.topLayoutConstraint.constant = -1 * self.topLayoutGuide.length; | |
} |
This file contains hidden or 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
<?php | |
function array_swap(&$array,$swap_a,$swap_b){ | |
list($array[$swap_a],$array[$swap_b]) = array($array[$swap_b],$array[$swap_a]); | |
} | |
$zwerge = [5, 5, 5, 5, 5, 8, 8, 8, 8, 8]; | |
shuffle($zwerge); | |
print_r($zwerge); |
This file contains hidden or 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
SELECT p.guid, CAST(pm.meta_value AS UNSIGNED) as abc FROM `wp_postmeta` AS `pm` | |
left join wp_posts AS p ON pm.post_id = p.id | |
where | |
p.post_date between '2014-01-01' and '2015-01-01' | |
and | |
pm.meta_key = 'like_count' |
This file contains hidden or 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
--- | |
- hosts: all | |
gather_facts: false | |
remote_user: ubuntu | |
sudo: yes | |
vars: | |
http_port: 80 | |
api_root: /var/www/ansibletest.com/ | |
tasks: | |
- name: update apt |
OlderNewer