Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am maciakl on github.
  • I am lukemaciak (https://keybase.io/lukemaciak) on keybase.
  • I have a public key whose fingerprint is A314 5C5C 6FC4 6268 8800 5023 D174 4A63 8129 BDAA

To claim this, I am signing this object:

# GPG Cheat Sheet
# generate a new key:
gpg --gen-key
# export public key
gpg --export -a keyname >> public.asc
# import public key
gpg --import public.asc
@maciakl
maciakl / DisableGWX.mkd
Created July 17, 2015 13:08
Disable Windows 10 Free Upgrade Reservation Prompt in Windows 7

Disable GWX Windows 10 Upgrade Prompt

There is no user friendly way disable the annoying task bar icon that prompts you to "reserve" a free upgrade to Windows 10. You can however get rid of it by adding a registry key under:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GWX

The key you are adding should be a DWORD named DisableGWX and it's vale should be set to 1.

@maciakl
maciakl / gist:1663584
Last active September 29, 2015 20:37
Reseting TCP/IP on Windows (because I always forget this).
netsh winsock reset catalog
netsh int ip reset resetlog.txt
@maciakl
maciakl / gist:1664704
Created January 23, 2012 18:32
Reset MySQL Password on Ubuntu
# Stop MySQL
sudo /etc/init.d/mysql stop
# Start MySQL skipping checks
sudo mysqld --skip-grant-tables &
# Log in as root
@maciakl
maciakl / gist:1983010
Created March 6, 2012 02:38
Placing Vim Files Under Source Control
# This is how you prepare your .vim directory to be source controlled across multiple platforms
# On Mac/Linux:
mv .vimrc .vim/
ln -s .vimrc .vim/vimrc
# On Winodws:
@maciakl
maciakl / gist:2406298
Created April 17, 2012 14:28
PHP: Export Query Results to a CSV File
<?php
// (c) 2007 Lukasz Grzegorz Maciak
// Code Snippet ID: 5e8cf864-db67-4a30-9857-2ce8f3fcb1d5
// takes a database resource returned by a query
function csv_from_mysql_resource($resource)
{
$output = "";
$headers_printed = false;

Frostgrave Soldeier Types

Soldier Cost Weapons
Warhound 10 -
Thug 20 HW
Thief 20 Dagger
Archer 50 Bow, Dagger, Leather
Crossbowman 50 Crossbow, Dagger, Leather
Infantryman 50 2-handed, Leather
@maciakl
maciakl / gist:3666289
Created September 7, 2012 13:34
URL Validation Regex of Doom
(?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.
)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)
){3}))(?::(?:\d+))?)(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F
\d]{2}))|[;:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{
2}))|[;:@&=])*))*)(?:\?(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{
2}))|[;:@&=])*))?)?)|(?:ftp://(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?
:%[a-fA-F\d]{2}))|[;?&=])*)(?::(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-
fA-F\d]{2}))|[;?&=])*))?@)?(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-
)*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?
:\d+)(?:\.(?:\d+)){3}))(?::(?:\d+))?))(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!
@maciakl
maciakl / gist:3900724
Created October 16, 2012 17:27
Pine Tricks:
Attaching a Message
-------------------
1. ^R in email body
2. ^W to attach a message
3. Type in message number and Enter
Delete All in Folder
--------------------