Skip to content

Instantly share code, notes, and snippets.

View jamosonic's full-sized avatar

Josh jamosonic

  • Melbourne, Australia
View GitHub Profile
@alisonailea
alisonailea / FlexBox_Layout.scss
Last active July 27, 2016 06:58
Based on CSS Tricks: Using Flexbox - http://css-tricks.com/using-flexbox/ & Special Thanks to Hugo Giraudel- http://hugogiraudel.com/2013/07/15/understanding-sass-lists/ Flexbox with elegant depreciation. Works in IE10+, iOS 6-, Safari 3.1-6, Firefox 20-, Chrome, Opera 12.1 The advantage of this Mixin set is it is small and reusable. Use any cla…
@mixin setFlexBox($flexType){
//options are block level or inline
@if $flexType == 'block'{
display: -webkit-box;
display: -moz-box;
display: box;
display: -ms-flexbox;
display: flexbox;
display: -webkit-flex;
display: flex;
@Integralist
Integralist / 1. Example Spec.js
Last active January 1, 2018 20:38
Mocking a Window object for unit-testing purposes
var mocks = {
resizeCalled: false,
createFakeWindow: function(width, height) {
var module = this;
return {
document: {
documentElement: {
clientWidth: width,
@kn
kn / TestTwitterFlightWithJasminOnRoR.md
Last active December 15, 2015 04:39
Test Twitter Flight components with Jasmine on Ruby on Rails

Test Twitter Flight components with Jasmine on Ruby on Rails

Twitter Flight is great framework for organizing frontend codebase. It make it more productive to work with and easier to test. However, it lacks in support for testing its modules. Moreover, there is not many guidance available on the web yet since it is fairly new.

This post explains how I setted up both in-browser and headless jasmine test for Twitter flight components used in Rails app.

Followings are used for the setup:

@runlevel5
runlevel5 / how_to_install_ruby_193-p392_on_osx_10_8.md
Last active January 23, 2019 22:51
How to install Ruby 1.9.3-p392 on OSX 10.8+

How to install Ruby 1.9.3-p392 on Mac OSX 10.8+

RVM:

rvm get stable && rvm reload

Firstly, the OpenSSL comes with your OSX 10.8+ is outdated, you need to get latest version

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
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:

@thulstrup
thulstrup / compass-retina-sprites.scss
Created March 20, 2012 19:18
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));
@jasoncodes
jasoncodes / gist:1223731
Created September 17, 2011 07:45
Installing Ruby 1.9.3 with rbenv on OS X
# The latest version of this script is now available at
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh
VERSION=1.9.3-p286
brew update
brew install rbenv ruby-build rbenv-vars readline ctags
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
@jamosonic
jamosonic / center list items (css)
Created July 26, 2010 04:03
Technique to center list items
#container,
#container ul,
#container li {
float: left;
position: relative;
}
#container {
width: 100%;
overflow: hidden;
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 29, 2025 03:07
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶