Skip to content

Instantly share code, notes, and snippets.

View DamirSvrtan's full-sized avatar
🎖️

Damir Svrtan DamirSvrtan

🎖️
View GitHub Profile
@ascendbruce
ascendbruce / README.md
Last active August 13, 2020 19:16
error when rake db:migrate with postgresql 9.6 and postgis 2.4. error message Server is version 9.6, library is version 10.0

error message

PG::InternalError: ERROR:  incompatible library "/usr/local/lib/postgresql/postgis-2.4.so": version mismatch
DETAIL:  Server is version 9.6, library is version 10.0.
: CREATE EXTENSION IF NOT EXISTS "postgis"
/Users/bruce/Projects/HB-Backend/db/migrate/20151013213623_enable_postgis.rb:3:in `change'
-e:1:in `<main>'

Caused by:
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@doismellburning
doismellburning / userstories.md
Last active October 30, 2017 16:25
Conference User Stories
@madwork
madwork / decode_session_cookie.rb
Last active October 22, 2020 18:13 — forked from profh/decode_session_cookie.rb
Rails 4.1+ Decode Session
@pboling
pboling / slim_vs_haml.md
Last active February 11, 2024 16:33
Slim vs Haml

Analysis of Slim vs. Haml Project Health

  • Static data as of April 13, 2015, some updates as of October 1, 2015
# Metric Haml Slim Winner
1 Issues Open Issues Open Issues Slim
2 Stars Stars Open Issues Slim
3 Quality Code Climate technical debt Code Climate maintainability -- Haml
4 Test Coverage ![Code Climate coverage](https://i
@RickCarlino
RickCarlino / classifier.rb
Created April 5, 2015 03:21
Using the Ruby 'classifier' gem to categorize a quote as "Ben Franklin" or "Paris Hilton"
require 'classifier'
robot_overlord = Classifier::Bayes.new 'hilton', 'franklin'
robot_overlord.train_hilton("The only rule is don't be boring and dress cute wherever you go. Life is too short to blend in.")
robot_overlord.train_hilton("The way I see it, you should live everyday like its your birthday.")
robot_overlord.train_hilton("No matter what a woman looks like, if she's confident, she's sexy.")
robot_overlord.train_hilton("I'd imagine my wedding as a fairy tale... huge, beautiful and white.")
robot_overlord.train_hilton("There's nobody in the world like me. I think every decade has an iconic blonde, like Marilyn Monroe or Princess Diana and, right now, I'm that icon.")
robot_overlord.train_hilton("Some girls are just born with glitter in their veins.")
@noisymask
noisymask / _bootstrap-3-extra-large-grid.scss
Last active April 14, 2023 17:29
Bootstrap 3 extra large grid with SASS
// for background see http://stackoverflow.com/a/25644266/526258
@import "bootstrap";
// XLarge screen
$screen-xl: 1600px;
$screen-xl-min: $screen-xl;
$screen-xl-hugedesktop: $screen-xl-min;
// So media queries don't overlap when required, provide a maximum
@subvertallchris
subvertallchris / gist:caaa99727990cfd3e4b3
Last active April 10, 2016 08:51
jbuilder vs activemodel::serializers

Each one is original first, then OJ.

rake benchmarks:single_object_with_render:

#original

Calculating -------------------------------------
            jbuilder        30 i/100ms
active_model_serializers
@mzabriskie
mzabriskie / random-attendee.js
Last active March 6, 2021 16:13
Select random Meetup attendee
// Run this from your browser console on your meetup event page (http://www.meetup.com/AngularJS-Utah/events/183104032/)
(function () {
// Query document for attendees and select a random one
const list = document.querySelector('ul.attendees-list').children,
item = list[Math.floor(Math.random() * list.length)],
name = item ? item.querySelector('h4.text--bold').innerText : 'N/A';
// Remove item so they can only be selected once
item && item.parentNode.removeChild(item);
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing