Skip to content

Instantly share code, notes, and snippets.

View mariusbutuc's full-sized avatar
🌏

Marius Butuc mariusbutuc

🌏
  • Toronto, ON
  • 09:54 (UTC -04:00)
View GitHub Profile
@mariusbutuc
mariusbutuc / git_branch_in_prompt.sh
Created June 7, 2016 18:42
git_branch_in_prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1
export PROMPT_COMMAND='__git_ps1 "\t \u@\h:\w" " \\\$ "'
export GIT_PS1_SHOWCOLORHINTS=1
@mariusbutuc
mariusbutuc / us_states.rb
Created June 16, 2016 18:13
Leverage Carmen to get US states
require 'carmen'
include Carmen
us = Country.named('United States’)
states = us.subregions.select { |subregion| subregion.type == 'state' }.map(&:name).sort
# => ["Alabama",
# "Alaska",
# "Arizona",
# "Arkansas",
# "California",
┃ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
┃ /usr/local/Cellar/shopify-ruby/2.2.3-shopify_2/bin/ruby -r ./siteconf20160823-27222-1ml83gd.rb extconf.rb
┃ checking for libgda/sql-parser/gda-sql-parser.h... no
┃ libgda is missing. Try 'brew install libgda'
┃ *** extconf.rb failed ***
┃ Could not create Makefile due to some reason, probably lack of necessary
┃ libraries and/or headers. Check the mkmf.log file for more details. You may
┃ need configuration options.
@mariusbutuc
mariusbutuc / modal-video-full.html
Created November 19, 2016 02:33 — forked from anam-hossain/modal-video-full.html
Full example - autoplay youtube video in a Modal (Bootstrap + Jquery)
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script>
$(function() {
$(".video").click(function () {
var theModal = $(this).data("target"),
videoSRC = $(this).attr("data-video"),

Back-end

  • Elixir
  • Elixir Metaprogramming
  • Phoenix
  • Ecto
  • GraphQL
  • Absinthe

Front-end

  • Relay
@mariusbutuc
mariusbutuc / introrx.md
Created January 4, 2017 18:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@mariusbutuc
mariusbutuc / sample-nginx.conf
Last active March 14, 2017 20:37 — forked from cjus/sample-nginx.conf
Nginx and React URL routing
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
location / {
expires 5m;
try_files $uri $uri/ /index.html;
}
@mariusbutuc
mariusbutuc / readable_amp.css
Created May 29, 2017 18:28
More readable AMP articles
amp-ad, .advertisement {
display: none !important;
}
p {
width: 80ch !important; /* classic! */
}