Skip to content

Instantly share code, notes, and snippets.

View stanwmusic's full-sized avatar
🏠
Working from home

Stan Williams stanwmusic

🏠
Working from home
View GitHub Profile
@thunsaker
thunsaker / jQuery Mobile Dropdown Menu.js
Created February 11, 2011 16:51
Basic dropdown menu with arrow and animation
function openMenu() {
$(document).ready(function () {
if ($('#div_menu_links_wrapper').is(':hidden')) {
$('#img_menu_arrow_down').css('display', 'none');
$('#img_menu_arrow_up').css('display', 'block');
$('#div_menu_links_wrapper').slideDown('slow', function myfunction() { });
} else {
$('#img_menu_arrow_down').css('display', 'block');
$('#img_menu_arrow_up').css('display', 'none');
$('#div_menu_links_wrapper').slideUp('slow', function myfunction() { });
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@jennschiffer
jennschiffer / dabblet.css
Created December 21, 2011 19:37
Jenn Makes Signs
/**
* Jenn Makes Signs
* Various road signage made with CSS and the RoadGeek font family
* Last Updated: December 21, 2011
* Dabblet: http://dabblet.com/gist/1507357
* Gist: https://gist.github.com/1507357
*/
@font-face { font-family: "RoadGeek"; src: url("http://pancaketheorem.com/css/signs/roadgeek2w.otf");}
@font-face {font-family: "RoadGeek Hospital"; src: url("http://pancaketheorem.com/css/signs/roadgeekf6b.otf")}
@jaygooby
jaygooby / git_notes.md
Last active June 25, 2024 11:26
Git, you bloody git

Overwrite untracked files in current branch from a remote branch

In a similar vein to git reset --hard feature/weavils you can just overwrite untracked working files (typically left over from branch experiments) which are part of the remote branch you're pulling like this:

git reset --hard origin/feature/weavils

Normally, if you tried git checkout feature/weavils you'd get warnings like untracked working tree files would be overwritten by merge, so hit them with the --hard hammer instead.

(Found via https://stackoverflow.com/q/17404316/391826 and one of the answers: https://stackoverflow.com/a/36824493/391826)

@Meroje
Meroje / unicode.txt
Created July 24, 2012 20:19
Some handpicked Unicode Art
1.)
║▌║││ █ ▌│║║
2.)
▄▀▄▀▄▀▄▀
3.)
@malihu
malihu / tabs.js
Created October 1, 2012 14:49
Fully commented code for the tabs.js script
(function($){
$.fn.Tabs=function(speed){ /* tabs transition speed parameter */
return this.each(function(){
/* define/cache variables */
var tabs=$(this),
tabsLabels=tabs.children("ul"),
tabLabel=tabsLabels.find("a"),
tabsContent=tabs.children("div"),
tabLink,
tabsLoader=tabsContent.children(".ajax-loader"); /* define ajax loader element */
@chrisjlee
chrisjlee / boot.sh
Created October 26, 2012 22:09
Boot repair
#!/bin/bash
# https://help.ubuntu.com/community/Boot-Repair
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
@edankwan
edankwan / Modernizr_preserve-3d_test.js
Last active October 31, 2017 10:12
preserve-3d test for Modernizr based on https://gist.github.com/4123325
(function(Modernizr, win){
Modernizr.addTest('csstransformspreserve3d', function () {
var prop = Modernizr.prefixed('transformStyle');
var val = 'preserve-3d';
var computedStyle;
if(!prop) return false;
prop = prop.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
@sandropaganotti-zz
sandropaganotti-zz / video.js
Last active December 14, 2015 20:59
A video to css encoder, live demo: sandropaganotti.com/wp-content/goodies/demos/video2css.
/*
To use it:
require(['video'], function(Video){
var video = new Video('.video');
// optionally, you can either drag a video file over the .video element
video.playvideo('a valid video url');
});
*/
@bavington
bavington / eu_cookie_banner.js
Last active May 17, 2022 06:22
Simple EU Cookie Law Banner JavaScript