Skip to content

Instantly share code, notes, and snippets.

View andreortiz82's full-sized avatar
🎯
Focusing

Andre Ortiz andreortiz82

🎯
Focusing
View GitHub Profile
@BideoWego
BideoWego / kitchen-sink.html
Last active February 28, 2020 09:42
HTML Kitchen Sink, all of the HTML elements in order for styling, testing, etc..
<h1>HTML Kitchen Sink</h1>
<h2>a</h2>
<a href="#">a</a>
<br>
<h2>abbr</h2>
<abbr title="abbr">Mr. Mrs. Dr.</abbr>
<br>
@kordano
kordano / url-param.cljs
Last active September 12, 2022 12:14
URL parameter parsing with clojurescript
(defn parse-params
"Parse URL parameters into a hashmap"
[]
(let [param-strs (-> (.-location js/window) (split #"\?") last (split #"\&"))]
(into {} (for [[k v] (map #(split % #"=") param-strs)]
[(keyword k) v]))))
@asafge
asafge / ng-really.js
Created November 12, 2013 13:06
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
@dblandin
dblandin / states.rb
Created June 25, 2012 22:51
Ruby array of US state name and abbreviations
states = Array[ ["AK", "Alaska"],
["AL", "Alabama"],
["AR", "Arkansas"],
["AS", "American Samoa"],
["AZ", "Arizona"],
["CA", "California"],
["CO", "Colorado"],
["CT", "Connecticut"],
["DC", "District of Columbia"],
["DE", "Delaware"],
@abuisman
abuisman / typography.sass
Created May 9, 2012 22:15
Mixin for responsive (relative) font-sizes depending on the screen size using media queries.
/*
Mixin for responsive (relative) font-sizes depending on the screen size using media queries.
This is width based, but you can easily adjust it for more complex, or simple, checking.
Set the base as you max size, then I divided everything into tenths of the base.
To use, simply include the mixin, passing it the font-size that you'd want to see at 100%.
This should then scale nicely along in tenths. If you need more detail, just add more elements to the level list.
@kaelig
kaelig / Gemfile
Created December 21, 2011 19:02
Sass and Compass in Ruby On Rails 3.1.1 w/ Asset Pipeline
# In your Gemfile:
gem 'haml'
gem 'sass'
gem 'compass', :git => 'git://github.com/chriseppstein/compass.git', :branch => 'master' # Rails 3.1.1 compatible version is still in alpha…
gem "sass-rails", "~> 3.1.5" # Required by Rails 3.1.1
@mystix
mystix / passenger-nginx-setup.sh
Created March 21, 2011 14:00
Rackspace Ubuntu -- RVM + PostgreSQL + Passenger + NGiNX setup script
# install rvm
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# install ruby 1.9.2 + some global gems
rvm install 1.9.2
rvm use 1.9.2@global
gem install awesome_print map_by_method wirble bundler builder pg cheat
gem install -v2.1.2 builder
@JangoSteve
JangoSteve / ubuntu_rails_install.rb
Created January 22, 2011 17:58
Capistrano script to install Ruby, RVM, Rails in ubuntu (modified from deploy.rb scripts)
namespace :ubuntu do
desc "Setup Environment"
task :setup_env, :roles => :app do
update_apt_get
install_dev_tools
install_git
install_subversion
install_sqlite3
# Install and setup RVM instead of old Rails stack
#install_rails_stack