Skip to content

Instantly share code, notes, and snippets.

View tomcardoso's full-sized avatar

Tom Cardoso tomcardoso

View GitHub Profile
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active November 14, 2024 17:18
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@iwarner
iwarner / _navbar.html.haml
Last active July 6, 2018 21:29
Middleman - Bootstrap - Navigation example
-### NavBar Partial
-# Usage
-# = partial("#{pathPartials}/bootstrap/navbar")
-# Requires a /data/navigation.yaml file to be present
-# Check and warn if empty
- if data.navigation.blank?
- puts "Data not found"
@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mbostock
mbostock / .block
Last active October 8, 2024 02:44
Save SVG as PNG
license: gpl-3.0
@milsyobtaf
milsyobtaf / jquery.playgif.js
Created January 31, 2014 17:25
Play Gif, by @jesse of SB Nation
/*!
* Play GIF
*
* by Jesse Young
*
* a jQuery plugin to play GIF animations on mouseover (or any other event).
*
* Examples:
* $('img[src$=".gif"]').playGIF(); // default is mouseover
* $('img[src$=".gif"]').playGIF({on:'click'}); // play animation on click
@razwan
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

// 1. Save gist as fixsvpplylinks.js
// 2. Install node.js (http://nodejs.org/)
// 3. 'npm install async request'
// 4. 'node fixsvpplylinks.js /path/to/wants.json'
// 5. Wait.
// 6. Don't worry about those EventEmitter warnings!
// 7. Done.
// 8. If there's any issues then give me a tweet (@artcommacode)