Skip to content

Instantly share code, notes, and snippets.

@emilstahl
emilstahl / twilio-sms.php
Last active January 4, 2016 05:49
Send Twillio SMS command line promoting for name, number and message.
<?php
// Step 1: Download the Twilio-PHP library from twilio.com/docs/libraries,
// and move it into the folder containing this file.
require "Services/Twilio.php";
// Step 2: set our AccountSid and AuthToken from www.twilio.com/user/account
$accountSid = 'xx';
$authToken = 'yy';
// Step 3: instantiate a new Twilio Rest Client
@emilstahl
emilstahl / Install OpenVPN
Created January 16, 2014 08:24
Install OpenVPN and made users
wget http://git.io/vpn --no-check-certificate -O openvpn-install.sh; chmod +x openvpn-install.sh; ./openvpn-install.sh
Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) (index):36
[cycle2] --c2 init-- jquery.cycle2.min.js:7
[cycle2] fx: fade (string) jquery.cycle2.min.js:7
[cycle2] timeout: 10000 (number) jquery.cycle2.min.js:7
[cycle2] slides: > div (string) jquery.cycle2.min.js:7
[cycle2] autoHeight: container (string) jquery.cycle2.min.js:7
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.js:4
Uncaught Error: Syntax error, unrecognized expression: http://emilstahl.dk/#tab-popular jquery.js:3
at.error jquery.js:3
mt jquery.js:3
@emilstahl
emilstahl / center-vertically-horizontally.css
Created November 13, 2013 23:52
Center an image vertically and horizontally in a container URL: http://www.brunildo.org/test/img_center.html Thanks to Brunildo.org for this: http://www.brunildo.org/test/img_center.htmll
<style type="text/css">
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width: ...;
height: ...;
}
.wraptocenter * {
vertical-align: middle;
@emilstahl
emilstahl / gist:5512881
Last active December 16, 2015 23:19
Fjern billede skygge fra Blogger Simple template http://emilstahl.dk/fjern-billede-skygge-fra-blogger-simple-template
/* Fjern billede skygge fra Blogger Simple template */
.post-body img, .post-body .tr-caption-container, .Profile img, .Image img,.BlogList .item-thumbnail img{border: 0px;-moz-box-shadow: 0px 0px 0px;-webkit-box-shadow: 0px 0px 0px;box-shadow: 0px 0px 0px;}
/* Emil Stahl Pedersen - emilstahl.dk */
@emilstahl
emilstahl / bookmarklet.js
Created October 9, 2015 20:30
Instagram
javascript:function image(){var metas=document.getElementsByTagName('meta');for(i=0;i<metas.length;i++){if(metas[i].getAttribute("property")=="og:image"){return metas[i].getAttribute("content")}}return""} window.open(image(),'_blank');
@emilstahl
emilstahl / wp-config.php
Created August 19, 2015 21:01
wp-config.php essentials
/* WordPress Cache */
define( 'WP_CACHE', true );
/* Compression */
define( 'COMPRESS_CSS', true );
define( 'COMPRESS_SCRIPTS', true );
define( 'CONCATENATE_SCRIPTS', true );
define( 'ENFORCE_GZIP', true );
/* Memory limit */
@emilstahl
emilstahl / backorder.sh
Created August 19, 2015 07:53
UnoEuro Backorder
#!/bin/bash
# copy the autologin cookie from your browser
# run /ue.sh list.txt
while IFS='' read -r line || [[ -n "$line" ]]; do
curl -o /dev/null --silent 'https://www.unoeuro.com/controlpanel/backorder.php' -H 'Cookie: language=1; autologin=XXXXXX;' --data 'domain='$line'&extension=dk'
done < "$1"
@emilstahl
emilstahl / config.fish
Last active August 29, 2015 14:27
Easy DMARC lookup
function dmarc
dig TXT +short _dmarc.$argv
end
@emilstahl
emilstahl / dmarc.txt
Last active August 29, 2015 14:27
DMARC check on FDIM toplist
QUESTION IN TYPE ANSWER Virksomhed
_dmarc.dba.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:iq4jzkji@ag.dmarcian.com\; ruf=mailto:iq4jzkji@fr.dmarcian.com\;" eBay
_dmarc.jobindex.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@jobindex.dk" Jobinex
_dmarc.bilbasen.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:iq4jzkji@ag.dmarcian.com\; ruf=mailto:iq4jzkji@fr.dmarcian.com\;" eBay
_dmarc.newsbreak.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@mailvision.dk\; ruf=mailto:forensic@mailvision.dk\; adkim=r\; aspf=r\; pct=100\; rf=afrf\; ri=86400\; sp=none" Uffe Dahl
_dmarc.amino.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@amino.dk" AMINO ApS To ejere gŒr igen
_dmarc.min-mave.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@min-mave.dk" MIN MAVE ApS sikkert samme IT
_dmarc.stepstone.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@stepstone.dk" Jobinex
_dmarc.it-jobbank.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@stepstone.dk" Jobinex