This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
echo "Installing ruby 1.9.3 on ubuntu.." | |
sudo apt-get update | |
sudo apt-get install curl | |
\curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm requirements | |
rvm install 1.9.3 | |
rvm use 1.9.3 --default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
eurl.py extracts all URLs (one per line) from the OPML file or URL. [I needed | |
this script produce a list of feed URLs so I could manually enter these RSS | |
feeds in the new Reeder 2 for iOS.] | |
Acknowledgement: Special thanks to Kurt McKee ( http://kurtmckee.org/ ) for the | |
script: http://stackoverflow.com/a/7782782 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.screencapture disable-shadow -bool true | |
killall SystemUIServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
ph.py -- purge (git) history | |
2015 ckunte | |
""" | |
import os | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# 2014 ckunte | |
# Convert Markdown files in a folder to plain text | |
# Requires pandoc and zsh. | |
# | |
# Run the following at zsh prompt: | |
# | |
# $ zsh md2txt.sh | |
# | |
for file in *.md; do pandoc -f markdown -t plain --wrap=none "$file" -o "$file.txt"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
mapsite.py | |
2014-06-07: Created by ckunte. | |
2014-08-28: Updated to urllib3, and beautifulsoup4. | |
Requirements: | |
1. beautifulsoup4 module. (pip install beautifulsoup4) | |
2. A file named srvclst.txt with ping servers list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
(c) 2011 ckunte. | |
*/ | |
// Widths for screens other than handhelds | |
$cwidth: 700px; | |
$pwidth: 640px; | |
// Side Margins | |
$smrg: ($cwidth - $pwidth) / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Code transform | |
Plugin URI: | |
Description: Based on <a href="http://1976design.com/blog/archive/2004/07/29/redesign-tag-transform/">Dunstan Orchard's tag transformations</a>, this plugin now can pull and list code snippets from flat .txt files. The plugin code is based on <a href="http://mathiasbynens.be/archive/2005/06/tag-transformations">Mathias Bynens</a>. Syntax in the post: <code><codeins="filename" /></code>. Filename to be without the extension, e.g. if the filename is <code>test.txt</code>, then the code becomes <code><codeins="test" /></code>. | |
Version: 1.0 | |
Author: ckunte | |
Author URI: http://ckunte.net/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WordPress has a built-in support for archive by day, archive by month, | |
// and archive by year, and so, this following snippet converts the dateline | |
// below each post linkable by day, month, and year to the archive. | |
// 2008 ckunte | |
// | |
<?php | |
$arc_day = get_the_time('j'); | |
$arc_month = get_the_time('m'); | |
$arc_year = get_the_time('Y'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// Autogenerate doodles (ala Google) for specific dates. | |
// Following is an example. Repeat from line 10 to line 18 | |
// in the code below for other events, and update event | |
// details, and image for the event. | |
// 2008 ckunte | |
// | |
$today = getdate(); | |
/* Christmas -- Example of a picture message */ |