Skip to content

Instantly share code, notes, and snippets.

View psyrendust's full-sized avatar

Larry Gordon psyrendust

View GitHub Profile
@psyrendust
psyrendust / opacity.scss
Created December 10, 2012 22:50
SASS mixins
@mixin opacity($val) {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=" $val * 100 ")"; /* IE 8 */
filter: alpha(opacity= $val * 100); /* IE 5-7 */
-khtml-opacity: $val; /* Safari 1.x (pre WebKit) */
-moz-opacity: $val; /* Firefox < 0.9 */
opacity: $val; /* FF 0.9+, Safari 2+, Chrome 1+, Opera 9+, IE 9+, iOS 3+, Android 2.2+) */
zoom: 1; /* gives the object layout */
}
@psyrendust
psyrendust / gist:4554623
Created January 17, 2013 08:49
CSS: Fancy Block Quote
blockquote {
margin: 0px 0px 0px 10px;
text-indent:-10px;
quotes: "\201C" "\201D";
}
blockquote:before { content: open-quote; }
blockquote:after { content: close-quote; }
@psyrendust
psyrendust / gist:4555751
Created January 17, 2013 12:53
JS: Get YouTube video ID from url
var url1 = "http://www.youtube.com/embed/sC_IESaVT0A?rel=0&amp;autohide=1&amp;autoplay=1";
var id1 = url1.replace(/(^(.)*(embed\/|watch\?v=))([0-9a-zA-Z_]*)(.)*/gm, "$4");
// id1 === 'sC_IESaVT0A'
var url2 = "http://www.youtube.com/watch/?v=sC_IESaVT0A";
var id2 = url2.replace(/(^(.)*(embed\/|watch\?v=))([0-9a-zA-Z_]*)(.)*/gm, "$4");
// id2 === 'sC_IESaVT0A'
@psyrendust
psyrendust / sbl
Last active December 16, 2015 03:29
If Sublime Text 2 does not have a window open, the file browser will be empty or sometimes a window will not be created. Opening/activating Sublime then sleeping for 1 second before sending it files/folders to open seems to fix this issue.
#!/bin/bash
# If Sublime Text 2 does not have a window open, the file browser will be empty
# or sometimes a window will not be created. Opening/activating Sublime then
# sleeping for 1 second before sending it files/folders to open seems to fix
# this issue.
#
# Setup:
# Save the file and name it `sbl` (no file extension)
# Move it to: `/usr/local/bin/sbl`
@psyrendust
psyrendust / dabblet.css
Created July 3, 2013 05:39
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
/*!
* Bootstrap v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
NODE_VERSION=0.4.7
NPM_VERSION=1.0.94
# Save script's current directory
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#cd "${DIR}"
#
@psyrendust
psyrendust / .jshintrc
Created July 8, 2013 10:47
JSHint Gutter not respecting project .jshintrc
{
"asi" : false,
"bitwise" : true,
"boss" : false,
"browser" : true,
"camelcase" : false,
"couch" : false,
"curly" : true,
"debug" : false,
"devel" : false,
@psyrendust
psyrendust / Gruntfile.js
Created July 24, 2013 07:00
Only hint changed files during a watch task.
grunt.initConfig({
watch: {
all: {
files: ['<%= jshint.all.src %>'],
tasks: ['jshint'],
options: { nospawn: true }
}
},
jshint: { all: { src: ['Gruntfile.js', 'lib/**/*.js'] } }
});
@psyrendust
psyrendust / dabblet.css
Created September 9, 2013 16:47
Untitled
.awesome-app {
padding-bottom: 20px;
}
.another-app {
padding-bottom: 10px;
}
.awesome-app .btn {
display: block; width: 200px; height: 30px; font-size: 14px; background: red; color: white; border: none;
}
.another-app .btn {
@psyrendust
psyrendust / org.samba.nmbd.plist
Last active October 18, 2020 13:22
LaunchDaemons for fixing Samba for OS X Mavericks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.samba.nmbd</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>