Skip to content

Instantly share code, notes, and snippets.

@madebyjazz
madebyjazz / clean-up-boot-partition-ubuntu.md
Created March 14, 2019 09:30 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@madebyjazz
madebyjazz / balloontip.py
Created August 29, 2017 14:07 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
@madebyjazz
madebyjazz / gitflow-breakdown.md
Created August 9, 2017 10:23 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@madebyjazz
madebyjazz / u.css
Last active January 17, 2016 23:02
body{
font-weight: bold;
}
h1{
color: green;
}
@madebyjazz
madebyjazz / gist:3509030
Created August 29, 2012 09:29
How to install GNU gettext on MAC OSX
  1. Wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext...t-0.12.1.tar.gz
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.
@madebyjazz
madebyjazz / compile_stdlib.py
Created April 30, 2012 07:41 — forked from diyan/compile_stdlib.py
Compile all Python scripts into single StdLib.dll .NET assembly
# Script below is based on following post:
# IronPython: EXE compiled using pyc.py cannot import module "os" - Stack Overflow
# http://stackoverflow.com/questions/6195781/ironpython-exe-compiled-using-pyc-py-cannot-import-module-os
import sys
sys.path.append('d:/projects/SomeProject/Libs/IronPython')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Lib')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Tools/Scripts')
import clr
@madebyjazz
madebyjazz / hyphenation.py
Created September 23, 2011 17:24 — forked from malthe/hyphenation.py
Dictionary-based HTML hyphenation using soft hyphen
import os
import re
from htmlentitydefs import name2codepoint
# Must install the `hyphenator` library from PyPi!
from hyphenator import Hyphenator
# Firefox comes with an English hyphenation dictionary
path = os.popen('locate hyph_en_US.dic').readlines()[0].strip()
(function($) {
$.fn.clippy = function(text, bgcolor) {
if (!bgcolor) {
var node = $(this);
while (node.css('background-color') == 'transparent' && node.length) {
node = node.parent();
}
if (!node.length) {
bgcolor = '#ffffff';
} else {
@madebyjazz
madebyjazz / example.html
Created August 8, 2011 08:41 — forked from joelnet/example.html
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@madebyjazz
madebyjazz / gist:1090663
Created July 18, 2011 21:10 — forked from saidimu/gist:1024207
Generating URLs to crawl from outside a Scrapy spider
from scrapy import log
from scrapy.item import Item
from scrapy.http import Request
from scrapy.contrib.spiders import XMLFeedSpider
def NextURL():
"""
Generate a list of URLs to crawl. You can query a database or come up with some other means
Note that if you generate URLs to crawl from a scraped URL then you're better of using a