Skip to content

Instantly share code, notes, and snippets.

@thanegill
thanegill / font-face mixin
Last active October 21, 2019 18:35 — forked from paul-english/gist:1340239
SCSS: font-face mixin
@mixin font-face($font-family, $url) {
@font-face {
font-family: '#{$font-family}';
src: url('#{$url}.eot');
src: url('#{$url}.eot?#iefix') format('embedded-opentype'),
url('#{$url}.woff') format('woff'),
url('#{$url}.ttf') format('truetype'),
url('#{$url}.svg') format('svg');
font-weight: normal;
font-style: normal;
@Craga89
Craga89 / ios-version.js
Created May 29, 2012 16:39
JavaScript iOS version detection
/*
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad
* Possible values include:
* 3 - v3.0
* 4.0 - v4.0
* 4.14 - v4.1.4
* false - Not iOS
*/
var iOS = parseFloat(
@mathiasverraes
mathiasverraes / phplint.sh
Created July 12, 2012 07:42
Recursive PHP Lint script
#!/bin/bash
for file in `find .`
do
EXTENSION="${file##*.}"
if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ]
then
RESULTS=`php -l $file`
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@sepehr
sepehr / greasemonkey_template.user.js
Created August 18, 2012 17:34
Userscript Template
// ==UserScript==
// @name SCRIPT
// @description SCRIPT DESCRIPTION
// @icon https://raw.github.com/sepehr/userscript-SCRIPT/master/SCRIPT.png
//
// @author Sepehr Lajevardi <me@sepehr.ws>
// @namespace http://github.com/sepehr
// @downloadURL https://raw.github.com/sepehr/userscript-SCRIPT/master/SCRIPT.user.js
//
// @license GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
@jonsuh
jonsuh / js-ajax-php-json-return.html
Last active September 17, 2022 02:57
jQuery AJAX Call to PHP Script with JSON Return
<div class="the-return">
[HTML is replaced when successful.]
</div>
@jr-codes
jr-codes / script.user.js
Created November 16, 2012 06:10
Userscript Boilerplate
// ==UserScript==
// @name Userscript Name
// @namespace http://example.com/
// @description Userscript Description
// @match http://example.com/* (or @include * to include all pages)
// @version 1.0
// ==/UserScript==
// Emulate Greasemonkey's unsafeWindow in Chrome
window.unsafeWindow = window.unsafeWindow || (function() {
@danmartin
danmartin / screen.scss
Created December 10, 2012 16:40
Sass Breakpoints Mixin
@mixin breakpoint($point) {
@if $point == sm-max {
@media (max-width: 460px) { @content; }
}
@else if $point == md-max {
@media (max-width: 800px) { @content; }
}
@else if $point == lg-max {
@media (max-width: 1024px) { @content; }
}
@vitormil
vitormil / gist:4364864
Last active May 27, 2022 18:20
partially disable the zsh's autocorrect feature

the problem:

subl somefile
zsh: correct 'subl' to 'ul' [nyae]? n

node -v
zsh: correct 'node' to 'od' [nyae]? n
v0.8.16
@timpulver
timpulver / GetNameAndTitleOfActiveWindow.scpt
Created February 11, 2013 10:38
[AppleScript] Get Name of active window | Returns the name / title of the active (frontmost) window
# taken from user Albert's answer on StackOverflow
# http://stackoverflow.com/questions/5292204/macosx-get-foremost-window-title
# tested on Mac OS X 10.7.5
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to first application process whose frontmost is true
set frontAppName to name of frontApp