Skip to content

Instantly share code, notes, and snippets.

@mtyeh411
mtyeh411 / git-remove-branches
Created April 15, 2020 14:48 — forked from TBonnin/git-remove-branches
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@mtyeh411
mtyeh411 / clear-sidekiq-jobs.sh
Created November 20, 2019 21:41 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs
@mtyeh411
mtyeh411 / better-nodejs-require-paths.md
Created October 7, 2019 21:20 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

Erlang/Elixir syntax reference

This reference is aimed at allowing you to comfortably read erlang documentation and consume terms printed in Erlang format. It does not aim at allowing you to write Erlang code.

This is a modified version of http://elixir-lang.org/crash-course.html

Data types

Erlang and Elixir have the same data types for the most part, but there are a number of differences.

@mtyeh411
mtyeh411 / LICENSE.txt
Last active August 29, 2015 14:06 — forked from addyosmani/README.md
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2014
Copyright (C) 2014 Addy Osmani @addyosmani
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE