Skip to content

Instantly share code, notes, and snippets.

UPDATE mysql.user SET Password=PASSWORD('a_new_password') WHERE User='root';
FLUSH PRIVILEGES;
links "http://www.google.dk/search?q=MasterCard+"merID"+ThreeDSecure"
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=postmaster
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
#mailhub=mail
#!/bin/sh
# Simple bash script to mail weather data from pywws to DMI Borgervejr
#
# Requirements:
# - Use the DMI Borgervejr template:
# https://github.com/x2q/pywws/blob/master/code/example_templates/dmi_borgervejr.txt
# - Configure pywws to output to /tmp/dmi.txt
# - Configure ssmtp for outbound mails
/bin/cat /tmp/dmi.txt | /usr/sbin/ssmtp borgervejr@dmi.dk
@x2q
x2q / github.css
Created February 28, 2013 07:42 — forked from theconektd/github.css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@x2q
x2q / wd-live-s3-backup.sh
Last active February 19, 2018 00:29
WD My Book Live Duplicity Back Up To Amazon S3 (and Glacier). See this blog post for more info: http://www.x2q.net/blog/2013/02/24/howto-backup-wd-mybook-live-to-amazon-s3-and-glacier/
#!/bin/sh
# WD Live Duplicity Back Up To Amazon S3 (and Glacier)
#
# Requires python-boto, duplicity, util-linux, and trickle to be installed
# Install using: apt-get install python-boto duplicity util-linux trickle
#
# See this blog post for more info:
# http://www.x2q.net/blog/2013/02/24/howto-backup-wd-mybook-live-to-amazon-s3-and-glacier/
AWSAccessKeyId=<your-access-key>
AWSSecretKey=<your-secret-key>
@x2q
x2q / ga.haml
Created December 28, 2012 13:00
Google Analytics Haml
-# Google Analytics Haml
:javascript
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'your Google Analytics tracking ID']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
@x2q
x2q / gist
Created December 7, 2012 20:36
#!/usr/bin/env ruby
# encoding: utf-8
#
# This file, gist, is generated code.
# Please DO NOT EDIT or send patches for it.
#
# Please take a look at the source from
# http://github.com/defunkt/gist
# and submit patches against the individual files
# that build gist.
-i
-X POST
-u 1a833e2f5e5f4a0abf0e8b4a5cced746:
-d "amount=100"
-d "currency=EUR"
-d "ip=1.1.1.1"
-d "card[number]=4111111111111111"
-d "card[expire_month]=12"
-d "card[expire_year]=2020"
-d "card[cvc]=000"