Skip to content

Instantly share code, notes, and snippets.

View michaelblyons's full-sized avatar
🤐
Contributions from this account are indefinitely paused

Michael michaelblyons

🤐
Contributions from this account are indefinitely paused
View GitHub Profile
@bkeating
bkeating / wordpress-wxr-example.xml
Created February 23, 2011 16:57
A vanilla example of the WordPress WXR Schema. Im using this as a starting point to build my own comments importer for disqus.com
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="http://www.disqus.com/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<!-- title of article -->
@ruediger
ruediger / attributes
Last active August 16, 2023 00:47
A collection of additional "custom hunk header" patterns for .gitattributes. This provides better context in the diff hunk header.
*.tex diff=tex
*.bib diff=bibtex
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
*.cpp diff=cpp
*.hpp diff=cpp
*.cc diff=cpp
*.hh diff=cpp
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@denji
denji / unbound-osx-homebrew.md
Last active November 27, 2022 08:33
Install unbound DNS(SEC) resolver on OS X, on the basis of https://www.spatof.org/blog/unbound-dns-resolver-on-osx.html
To install unbound you can use homebrew
$ brew install unbound ldns
Now we can edit the configuration file of unbound which by default is located in /usr/local/etc/unbound/unbound.conf:
@k-takata
k-takata / bash-completion-slowness-on-msys2.md
Created May 13, 2015 15:08
Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2 when the current user is a domain user. This describes the cause and the solutions.

Cause

Expansion of ~* is very slow when you use a domain user. For example:

@GaryLee
GaryLee / RunAsAdmin.py
Last active March 22, 2024 21:52
Elevate the privilege to Admin. Support both python script and pyinstaller wrapped program. Need ctypes only.
#!python
# coding: utf-8
import sys
import ctypes
def run_as_admin(argv=None, debug=False):
shell32 = ctypes.windll.shell32
if argv is None and shell32.IsUserAnAdmin():
return True
@tylermakin
tylermakin / Multipart MIME Email.md
Last active May 7, 2024 21:24
Multipart MIME Email Guide

Multipart MIME Email Guide

This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.

// Example Multipart Email:
From: sender@example.com
To: recipient@example.com
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
@cs278
cs278 / 0.4.8_0.4.9.diff
Created August 2, 2017 15:26
Web Developer 0.4.9 toolbar hacked
diff '--unified=3' --recursive 0.4.8_0/background/javascript/background.js 0.4.9_0/background/javascript/background.js
--- 0.4.8_0/background/javascript/background.js 2017-03-15 10:38:38.650194261 +0000
+++ 0.4.9_0/background/javascript/background.js 2017-08-02 14:18:29.679041517 +0100
@@ -1,3 +1,16 @@
+console.log("Start");
+
+chrome.runtime.onInstalled.addListener(function(details) {
+ console.log("onInstalled");
+ if(details.reason == "install") {
+ console.log("This is a first install!");
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@JimWolff
JimWolff / bbp_http2fs_win2k16-2018-03-12.ictpl
Last active November 19, 2020 10:09
IISCrypto template optimized for windows server 2016 to enable http2 and disable blacklisted ciphersuites plus updated with newest weak ciphers disabled (this template is used in my autofix ssl script here: https://gist.github.com/JimWolff/fc35d863db8971b2a73c96f90c5002e4 )
<?xml version="1.0" encoding="utf-16"?>
<iisCryptoTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="0">
<header>
<name>Best Practice, prio HTTP/2, FS</name>
<author>Jim Wolff</author>
<lastUpdated>2018-03-12T12:45:11.0463186Z</lastUpdated>
<description>Using best practises, but TLS_ECDHE_ECDSA is prioritesed because its needed for http/2 not to use blacklisted cipher suites, prioriteses suites to ensure FS</description>
<builtIn>false</builtIn>
</header>
<schannel setClientProtocols="true">