Skip to content

Instantly share code, notes, and snippets.

View favrik's full-sized avatar
🏀

Favio Manriquez favrik

🏀
View GitHub Profile
@darcros
darcros / palindrome.erl
Last active July 29, 2020 04:15
Concurrent Programming in Erlang - The University of Kent - chapter 1.5
-module(palindrome).
-export([server/0, client/2, start_load_balancer/1, test_all/0]).
rem_punct(String) ->
lists:filter(fun (Ch) ->
not lists:member(Ch, "\"'\t\n ")
end,
String).
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 24, 2024 20:51
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@staltz
staltz / introrx.md
Last active July 25, 2024 16:52
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active July 20, 2024 16:44
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@nickloewen
nickloewen / bret_victor-reading_list.md
Last active July 12, 2024 17:54
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active May 28, 2024 17:41
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@favrik
favrik / Vagrantfile
Created September 16, 2012 07:06
Chess.com Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "chessdev"
config.vm.guest = :freebsd
config.vm.box_url = "http://images.chesscomfiles-4.com/images/package.box"
config.vm.network :hostonly, "10.10.10.10"
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@thechrisoshow
thechrisoshow / dynamic_validations.rb
Created March 29, 2012 11:56
How to add validations to a specific instance of an active record object?
class Banana < ActiveRecord::Base; end
banana = Banana.new
banana.valid? #=> true
banana.singleton_class.validates_presence_of :name
banana.valid? #=> true - why did the validation not work?
banana.class.validates_presence_of :name
banana.valid? #=> false - as we'd expect...but now...