Skip to content

Instantly share code, notes, and snippets.

View flexbox's full-sized avatar

David Leuliette flexbox

View GitHub Profile
@martindebrunne
martindebrunne / amazon_service.rb
Last active May 3, 2017 17:21
Get a s3 signature for Ruby (used in ROR here) and how to set an image uploader using s3
class AmazonService
class << self
def get_s3_upload_key(user_folder, project_folder)
bucket = < TO FILL >
access_key = < TO FILL >
secret_key = < TO FILL >
env = ENV["S3_ENV"]
key = "#{env}/#{user_folder}/#{project_folder}/"
expiration = 1.days.from_now.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z')
max_filesize = 16.megabytes
@AttilaGal
AttilaGal / renamer.js
Last active April 19, 2022 19:28
rename all js to ts recursively
/*
This is a helper script that can be used to recursively rename all
JavaScript files within a given directory into TypeScript files.
call:
node renamer <directory>
*/
var fs = require('fs');
var path = require('path');
var ANSI_GREEN = '\x1b[32m';

Pitchfork’s Product team is hiring. We're looking for a sharp, creative front-end developer excited about pushing hard on UI and UX across all platforms. Your work will be seen daily by millions around the world, and you'll be a part of a small team of designers and developers whose work has been praised for redefining online music journalism and influencing the medium itself.

Our work environment is fast-paced and intimate: we all work very closely, and everyone has say in new ideas, features, and approach. You should be someone constantly learning about new technology and keenly aware of its practical applications and limitations. It should go without saying that you’re willing to take on any task, regardless of size or glory. Everyone here wears many hats, and no job is too small for anyone. Strong communication skills are a must, as is the desire to teach as much as you learn. A love for music doesn’t hurt, either.

Responsibilities

As part of Pitchfork’s Product team, you will help us

  • consistent
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black
@rafibomb
rafibomb / desktop menu partial
Created May 2, 2015 04:17
Using Interchange on a mega-menu
<nav class="mega-menu">
<div class="row collapse">
<div class="medium-3 columns">
<img src="assets/img/duality.png" alt="company logo">
</div>
<div class="medium-7 columns">
<ul class="button-group even-3">
<li><a href="#" class="button" data-dropdown="living" data-options="is_hover:true; hover_timeout:500">Living Room Furniture</a></li>
<li><a href="#" class="button" data-dropdown="bedroom" data-options="is_hover:true; hover_timeout:500">Bedroom Room Furniture</a></li>
<li><a href="#" class="button" data-dropdown="storage" data-options="is_hover:true; hover_timeout:500">Storage<br>Furniture</a></li>
@Papillard
Papillard / Gemfile
Last active September 20, 2022 20:12
Longest-Word Rails livecode @lewagon
# Very precious debug gems :)
gem 'binding_of_caller', group: :development
gem 'better_errors', group: :development
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 20, 2025 09:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@addyosmani
addyosmani / README.md
Last active April 29, 2025 13:39 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
$alerts: (error, red, 1px),
(success, green, 2px),
(info, blue, 2px);
@each $type, $color, $border-width in $alerts {
.alert--#{$type} {
border: $border-width solid $color;
}
}