Skip to content

Instantly share code, notes, and snippets.

@Bostonncity
Bostonncity / JokeLinux.patch
Created December 6, 2015 08:26 — forked from RKX1209/JokeLinux.patch
When apply this patch to linux kernel 3.13, you can choose config option 'NO_SIGSEGV', that disable SIGSEGV. In other words, when SEGV happen, new elf section corresponding segv address will allocated.
--- arch/x86/Kconfig
+++ arch/x86/Kconfig
@@ -263,6 +263,24 @@ config ARCH_SUPPORTS_UPROBES
source "init/Kconfig"
source "kernel/Kconfig.freezer"
+menu "Joke setup"
+
+config NO_SIGSEGV
+ bool "SIGSEGV must not happen"
@Bostonncity
Bostonncity / mail.cs
Created December 6, 2015 08:30 — forked from misodengaku/mail.cs
Bonsai XSS Revolutions writeup
// SMTPでメールを送信する: .NET Tips: C#, VB.NET
// http://dobon.net/vb/dotnet/internet/smtpmail.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
@Bostonncity
Bostonncity / FilesSnapshot.xml
Created December 6, 2015 08:33
winscp.powershell v5.7.3.1 - Failed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\winscp.powershell\chocolateyinstall.ps1" checksum="D9337D5F4F51A9CBED8FDEB75E45B80E" />
<file path="C:\ProgramData\chocolatey\lib\winscp.powershell\chocolateyuninstall.ps1" checksum="71B95098BA924DEDC631F291E37721BF" />
<file path="C:\ProgramData\chocolatey\lib\winscp.powershell\winscp.powershell.nupkg" checksum="7B9256093312D4A38878C4301D1DFD8C" />
</files>
</fileSnapshot>
@Bostonncity
Bostonncity / gist:7ce074661ba5412c5b1d
Created December 6, 2015 08:40 — forked from tamoyal/gist:2ea1fcdf99c819b4e07d
Upgrade Postgres 9.3 to 9.4 on Ubuntu
# Be sure to save your config files. Optional but I do:
sudo cp /etc/postgresql/9.3/main/postgresql.conf ~
sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~
# Package repo (for apt-get)
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
# Also probably optional but I like to update sources and upgrade
sudo apt-get update
@Bostonncity
Bostonncity / box-linux.sh
Created December 6, 2015 08:44 — forked from eladc/box-linux.sh
Mount your Box.com Account Using davfs2
#!/bin/bash
## davfs2 installation and Box.com account configuration script for Linux
## Tested on Ubuntu, Fedora and OpenSuse
## Update 1.032615
## This script must be run as root
if [ ! $UID = 0 ]; then
echo "This script needs super user privileges to run"
echo "run it againg using sudo or login as root"
exit 1
@Bostonncity
Bostonncity / irc.md
Created December 6, 2015 08:55 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
@Bostonncity
Bostonncity / gh-pages-deploy.md
Created December 6, 2015 09:05 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
Startup20: A Sensible Replacement for the MS Windows "Startup/" Folder
======================================================================
Author: "Paul Prince" <paul@littlebluetech.com>
License: Modified BSD License; see ./LICENSE.txt
Inspired by:
------------
- WindowPadX
@Bostonncity
Bostonncity / us-state-names-abbrevs.php
Created December 10, 2015 10:25 — forked from maxrice/us-state-names-abbrevs.php
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',