Skip to content

Instantly share code, notes, and snippets.

View sheljohn's full-sized avatar
🐇
Knock, knock.

Jonathan H sheljohn

🐇
Knock, knock.
  • Oxford
View GitHub Profile
@yurivictor
yurivictor / tabs.html
Created February 28, 2012 17:16
Simple jquery sliding tabs
<style>
.tabs { border-bottom: 1px solid #d4d4d4; padding-left: 0; }
.tabs a { background: #eee; border: 1px solid #d4d4d4; color: #6a6a6a; display: block; float: left; line-height: 36px; margin-bottom: -1px; padding: 0 10px; text-decoration: none; }
.tabs li { list-style: none; }
.tabs .active { background: #fff; border-bottom: 0; color: #2c2c2c; font-weight: 700; padding-bottom: 1px; }
.hide { display: none; }
.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
</style>
@fprimex
fprimex / nonroot.sh
Created February 15, 2014 02:13
Non-root package installs under opensuse
mkdir -p ~/local/var/lib
mkdir ~/local/etc
cd ~/local/etc
cp -R /etc/zypp .
cd ~/local/var/lib
cp -R /var/lib/rpm .
cd
cat >> ~/.bashrc << 'EOF'
export PATH="$HOME"/local/usr/bin:"$PATH"
@yuliji
yuliji / unicode_block.py
Created March 23, 2018 06:57
[unicode_range] unicode block check, need python3
# coding: utf-8
UNICODE_RANGES = \
[[u'\x00', u'\x1f', u'Control character'],
[u' ', u'\x7f', u'Basic Latin'],
[u'\x80', u'\xff', u'Latin-1 Supplement'],
[u'\u0100', u'\u017f', u'Latin Extended-A'],
[u'\u0180', u'\u024f', u'Latin Extended-B'],
[u'\u0250', u'\u02af', u'IPA Extensions'],
[u'\u02b0', u'\u02ff', u'Spacing Modifier Letters'],
@bjorgvino
bjorgvino / yosemite ntfs read+write.txt
Last active December 2, 2021 03:58
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@aubricus
aubricus / License
Last active June 20, 2023 01:19
Python Progress Bar
Copyright 2020 Aubrey Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH
@remy
remy / gist:2484402
Created April 24, 2012 22:45
jquery.marquee.js
/**
* author Remy Sharp
* url http://remysharp.com/tag/marquee
*/
(function ($) {
$.fn.marquee = function (klass) {
var newMarquee = [],
last = this.length;
@kjbrum
kjbrum / bash_profile.sh
Last active October 18, 2023 15:36
My personal bash profile
#---------------------------------------------------------------------------------------------------------------------------------------
#
# Author: Kyle Brumm
# Description: File used to hold Bash configuration, aliases, functions, completions, etc...
#
# Sections:
# 1. ENVIRONMENT SETUP
# 2. MAKE TERMINAL BETTER
# 3. FOLDER MANAGEMENT
# 4. MISC ALIAS'
@nk9
nk9 / largestFiles.py
Last active November 14, 2023 09:47
Python script to find the largest files in a git repository.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects.
#
@andrewrcollins
andrewrcollins / mix_tint_tone_shade.php
Last active February 24, 2024 18:52
Color Mixing, Tint, Tone, and Shade in PHP
<?php
/**
* mix
*
* @param mixed $color_1
* @param mixed $color_2
* @param mixed $weight
*
* @return void
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh