Skip to content

Instantly share code, notes, and snippets.

View saneef's full-sized avatar
🐢

Saneef Ansari saneef

🐢
View GitHub Profile
@unruthless
unruthless / CSS for <sup> and <sub>
Created May 26, 2010 01:31
CSS for <sub> and <sup>
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@indirect
indirect / semantic_summary.rb
Created July 30, 2012 10:08 — forked from chriseppstein/semantic_summary.rb
This ruby script will summarize the html5 semantic structure of a webpage so that you can more easily ensure the page is correct.
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
url = ARGV[0]
class Document < Nokogiri::XML::SAX::Document
SEMANTIC_CONTAINERS = %w(body article section nav aside hgroup header footer)
COUNT_ELEMENTS = %w(p a)

26 time management hacks I wish I'd known at 20

  1. There's always time. Time is priorities
  2. Days always fill up | "Only plan for 4-5 hours of real work per day."
  3. Work more when you're in the zone. Relax when you're not. | "It's normal to have days where you just can't work and days where you'll work 12 hours straight"
  4. Respect your time and make it respected | "Your time is $1000/hour, and you need to act accordingly"
  5. Stop multi-tasking. It merely kills your focus.
  6. Set up a work routine and stick to it. Your body will adapt
  7. We're always more focused and productive with limited time.
  8. Work is the best way to get working. Start with short tasks to get the ball rolling.
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@zmwangx
zmwangx / thumbnails.sh
Last active March 3, 2024 15:51
Script to generate thumbnails of a video and combine into one tile image. Uses FFmpeg and ImageMagick.
#!/bin/zsh
# Script to generate thumbnails of a video and combine into one tile image.
#
# CAUTION:
# FFprobe might fail to extract duration info from a MKV container. Use
# ffmpeg -i video.mkv -c:v copy -c:a copy video.mp4
# to swap to an MP4 container.
#
# Dependencies:
# 1. ffmpeg
@Nzen
Nzen / readme.md
Last active December 7, 2022 22:10
JavaDoc dark theme

What is this?

A css to replace the light version that Oracle serves. I like dark themes for the webpages that I read. All that must be done is change the stylesheet link in the pages you use or to nest the pages at the appropriate level.

@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — 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

@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@IainIsCreative
IainIsCreative / _baseline.scss
Created November 26, 2014 14:02
A very simple Baseline SCSS mixin for providing a visual baseline in your project, in CSS.
// Set up line-height and colour defaults for this mixin.
$line-height: 20px!default;
$line-color: #94d4ff!default;
/**
*
* Baseline Mixin
* Handy dandy mixin to provide a baseline for your typography.
*
* The mixin carries two arguments — the $baseline, which should match your line-height, and $baseline-color, the colour you want the lines to be.