Skip to content

Instantly share code, notes, and snippets.

Mike Acton macton

Block or report user

Report or block macton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View vim_tips.txt
----------------------------------------------------------------------------------------------------------------
Find & Replace non-printable characters in vim
http://durgaprasad.wordpress.com/2007/09/25/find-replace-non-printable-characters-in-vim/
1) Find hexa value of that non-printable character. Move your cursor to that character and press ‘ga’.
2) In escape mode, execute this ‘:%s/\%x85/\r/gc’. In my case, hexadecimal value of that non-printable character is 85. I replaced that with ‘\r’.
----------------------------------------------------------------------------------------------------------------
@macton
macton / 00 win8_tips.txt
Last active Dec 23, 2016
Windows 8 Tips
View 00 win8_tips.txt
Tips for Windows 8
@macton
macton / chromebook_tips.txt
Last active Apr 4, 2016
Random tidbits for Chromebook
View chromebook_tips.txt
---------------------------------------------------------------------------------------------------
Turn off power down on time out
Turn off power down on lid close
$ sudo stop powerd
---------------------------------------------------------------------------------------------------
Open port 22 for ssh
$ sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
---------------------------------------------------------------------------------------------------
Set hostname
$ sudo hostname <new-hostname>
@macton
macton / cgi-proxy.c
Created Feb 5, 2012
Quick and dirty cgi proxy in C using curl
View cgi-proxy.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ccgi.h>
#include <curl/curl.h>
static size_t
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t i;
You can’t perform that action at this time.