Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Porzky papoms

View GitHub Profile
View CasperJS Fitted Screenshot
var casper = require('casper').create();
/* var url = casper.cli.args[0]; */
var url = 'http://kicker.de';
var fn = url.replace(/[^a-z0-9]/gi, '').toLowerCase();
// Settings
var targetWidth = 800; //final Image Size
var targetHeight = 600;
@papoms
papoms / .bash_profile
Last active Oct 10, 2015
Bash Prompt Profile
View .bash_profile
# Bash Prompt
# export PS1="\[\033[0;32m\]\u@\[\033[0;34m\]\h \[\033[1;34m\]\w\[\033[0m\]$ "
export PS1='\[\033[01;32m\]\u\[\033[01;34m\] \w\[\033[31m\]$(git branch 2>/dev/null|cut -f2 -d\* -s)\n\[\033[1;37m\]➜\[\033[00m\] '
# My Path
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin/whatweb:$PATH
# LS COLORS
export TERM="xterm-color"
@papoms
papoms / dnsmasq
Created Sep 17, 2012
Virtual Doc Root Setup for Mountain Lion
View dnsmasq
# Install DNSmasq
brew install dnsmasq
# cp default config to the right place
cp /usr/local/Cellar/dnsmasq/2.63/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
# Daemonize
sudo cp /usr/local/Cellar/dnsmasq/2.63/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/
# Add .dev to the resolver
@papoms
papoms / Click Coordinates
Created Nov 18, 2014
Get Click Coordinates based on a normal distribution
View Click Coordinates
<?php
// Return Random Float between min and max
function randomFloat($min = 0, $max = 1) {
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
}
// returns normally distributed coordinates in a given range (0 to nMax)
function getClickCoordinates(&$x, &$y, $xMax = 100, $yMax = 100){
@papoms
papoms / Move to Follow-Up.scpt
Created Dec 9, 2013
Outlook mac 2011 - Move to folder Shortcut Action (Automator Workflow)
View Move to Follow-Up.scpt
(*
Original code from http://forgetmenotes.blogspot.com/2011/01/mac-outlook-2011-keyboard-shortcut-to.html
Adapted 2013 by Paul Porzky http://porzky.com
*)
on run {}
tell application "Microsoft Outlook"
-- listSelectedItems : a list of all items selected in Entourage
@papoms
papoms / Code.gs
Created Apr 11, 2015
Twilio SMS API for Google App Scripts - Send a Textmessage from Google Docs
View Code.gs
/**
* Sends a Short Message using the Twilio REST API
*
* It uses UrlFetchApp.fetch to send a POST request with Basic Authentication to the Messages list resource URI
* See https://www.twilio.com/docs/api/rest/sending-sms for documentation of the Twilio Api Call
* See https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app for Documentation on UrlFetchApp
*
* Get Your Api Credentials from https://www.twilio.com/user/account/settings
*
* @param {String} to The Recipients Number e.g. '+1323452345'
@papoms
papoms / loadlist.phantom.js
Created Aug 25, 2012
load a list of urls with phantomjs
View loadlist.phantom.js
var urls = [
'http://keyworddomains.com',
'http://blog.keyworddomains.com',
'http://timer.keyworddomains.com'
];
var page = require('webpage').create();
function process(){
if (urls.length == 0){
@papoms
papoms / fake-referrer.phantom.js
Last active Oct 20, 2017
Fake Referrer with Phantomjs
View fake-referrer.phantom.js
var system = require('system');
// Exit in case of wrong parameter count.
if (system.args.length !== 3) {
console.log('Usage: scriptname targetUrl referrer');
console.log('example: $> phantomjs fake-referrer.phantom.js http://example.com http://referrer.example.com');
phantom.exit();
}
// Set the important pieces
@papoms
papoms / fake-referrer.casper.js
Created Aug 24, 2012
Fake Referrer with CasperJS
View fake-referrer.casper.js
var fakeReferrer = "http://porzky.com"
var targetUrl = "http://keyworddomains.com"
var casper = require('casper').create();
casper.start(fakeReferrer, function() {
this.echo(this.getCurrentUrl());
});
casper.then(function(){
@papoms
papoms / keybase.md
Created Mar 21, 2019
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am papoms on github.
  • I am papoms (https://keybase.io/papoms) on keybase.
  • I have a public key ASAKDds-NANNwLom3V4598Fc6vsoxNwoa3HezTE2h4dlrgo

To claim this, I am signing this object:

You can’t perform that action at this time.