Skip to content

Instantly share code, notes, and snippets.

@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 / 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;
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 / 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
@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 / unoeuro-batch-delete-products.js
Created January 27, 2014 00:06
Batch delete UnoEuro products the easy way!
$('input[value=notusing]').attr('checked', true);
$('input[name=confirm]').attr('checked', true);
$('input[name=confirm2]').attr('checked', true);
document.forms['form1']['confirmtext'].value += 'SLET DOMAIN.TLD';
document.forms["form1"].submit();
@emilstahl
emilstahl / twilio-make-call.php
Last active August 29, 2015 13:56
Make a call with PHP and the Twilio REST API.
<?php
// Include Twilio PHP library
require 'Services/Twilio.php';
// Twilio REST API version
$version = "2010-04-01";
// AccountSid and AuthToken
$sid = 'AC4a5463a2b9db0755e9c668b8b117fb91';
$token = 'f86d4aa9e8c17cafa80cd88de7594716';
@emilstahl
emilstahl / resizeimages.php
Created April 7, 2014 13:27
Resize WordPress wp-content images.
<?php
/*
Recursive Image Resizer (For Wordpress) 1.0
By Frands B. Hansen <[email protected]>
Copyright (c) 2013, Frands B. Hansen
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@emilstahl
emilstahl / list.txt
Created April 16, 2014 21:41
Domæner der starter på A med heartbleed
This file has been truncated, but you can view the full file.
2014-04-16 22:52:48 aahuset.dk SSL Connection Failed
2014-04-16 23:05:06 arildskov.dk SSL Connection Failed
2014-04-16 23:01:14 areyouready.dk Not Vulnerable
2014-04-16 23:04:28 art-n-image.dk Not Vulnerable
2014-04-16 23:02:19 antiqueshop.dk Not Vulnerable
2014-04-16 22:56:54 abra.dk Not Vulnerable
2014-04-16 22:53:36 ab-flytteforretning.dk Not Vulnerable
2014-04-16 23:05:00 asnames.dk Not Vulnerable
2014-04-16 23:00:57 andwin.dk Not Vulnerable
2014-04-16 23:02:01 analzone.dk Not Vulnerable
@emilstahl
emilstahl / print.html
Created April 18, 2014 22:33
Trigger browser to print page
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<script type="text/javascript">
function Print(){
document.body.offsetHeight;window.print();
}
</script>
</head>