Skip to content

Instantly share code, notes, and snippets.

@uqmessias
uqmessias / devices-model-resolution.md
Last active February 29, 2024 03:27
Some Android devices dimensions
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 23, 2024 06:15
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@ncreated
ncreated / PrintLocalesController.m
Last active February 29, 2024 16:29
List of iOS locales with currency formatting.
//
// PrintLocalesController.m
// NSFormatterTest
//
// Created by Maciek Grzybowski on 02.04.2014.
//
#import "PrintLocalesController.h"
@interface PrintLocalesController ()
@niw
niw / .slate
Created October 17, 2013 21:40
My current settings for Slate
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Shift + Command
bind up:shift;cmd move screenSizeX/5;0 screenSizeX/5*3;screenSizeY
bind down:shift;cmd push down bar-resize:screenSizeY
bind right:shift;cmd move screenSizeX-320;screenSizeY/2 300;screenSizeY/2
bind left:shift;cmd move 20;screenSizeY/2 700;screenSizeY/2
@stammy
stammy / _media-queries.scss
Created November 26, 2012 06:16 — forked from anthonyshort/_media-queries.scss
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@kimroen
kimroen / high-dpi-media.scss
Created November 20, 2012 10:24 — forked from marcedwards/high-dpi-media.css
A Sass media query mixin that captures almost all high DPI aware devices.
/* ----------------------------------------------------------------------- */
/* */
/* Improved upon a mixin from 37signals and combined */
/* with these numbers from marc. */
/* */
/* 37signals-version: */
/* http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss */
/* */
/* @kimroen */
/* */
@alanhogan
alanhogan / compass-retina-sprites.scss
Created June 5, 2012 23:21 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@addyosmani
addyosmani / pubsub.md
Created October 28, 2011 06:49
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

@troyk
troyk / whyme.js
Created October 12, 2011 17:32
Get a list of email addresses from your gmail sent folder using node
// Based off an example from node-imap, will output a list of email addresses from your
// gmail sent folder (so you can copy/paste to the BCC field and let people know your
// sorry for using the same password all over the internet resulting in your buddies
// getting a lame spam message)
var ImapConnection = require('imap').ImapConnection,
imap = new ImapConnection({
username: '{{replace}}@gmail.com',
password: '{{replace}}',
host: 'imap.gmail.com',
@sulf
sulf / gist:1157909
Created August 19, 2011 20:23
Rails helper time_ago_in_words() and distance_of_time_in_words() translated into JavaScript
var distance_of_time_in_words, time_ago_in_words;
time_ago_in_words = function(from_time, include_seconds) {
if (include_seconds != null) {
include_seconds;
} else {
include_seconds = false;
};
return App.distance_of_time_in_words(from_time, Date.now(), include_seconds);
};
distance_of_time_in_words = function(from_time, to_time, include_seconds) {