Skip to content

Instantly share code, notes, and snippets.

Avatar

Emil Stahl emilstahl

View GitHub Profile
View gist:5512881
/* 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 Nov 13, 2013
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
View center-vertically-horizontally.css
<style type="text/css">
.wraptocenter {
display: table-cell;
text-align: center;
vertical-align: middle;
width: ...;
height: ...;
}
.wraptocenter * {
vertical-align: middle;
View AlxTab not working
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 Jan 16, 2014
Install OpenVPN and made users
View Install OpenVPN
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 Jan 4, 2016
Send Twillio SMS command line promoting for name, number and message.
View twilio-sms.php
<?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 Jan 27, 2014
Batch delete UnoEuro products the easy way!
View unoeuro-batch-delete-products.js
$('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 Aug 29, 2015
Make a call with PHP and the Twilio REST API.
View twilio-make-call.php
<?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 Apr 7, 2014
Resize WordPress wp-content images.
View resizeimages.php
<?php
/*
Recursive Image Resizer (For Wordpress) 1.0
By Frands B. Hansen <fbh@helpsoft.dk>
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 Apr 16, 2014
Domæner der starter på A med heartbleed
View list.txt
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
@emilstahl
emilstahl / print.html
Created Apr 18, 2014
Trigger browser to print page
View print.html
<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>