Skip to content

Instantly share code, notes, and snippets.

View nebtrx's full-sized avatar
🎈
out of the comfort zone

Omar García nebtrx

🎈
out of the comfort zone
View GitHub Profile
@nebtrx
nebtrx / Polly Nuget Package Test
Created January 31, 2015 17:05
Polly Nuget Package Test
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Polly;
namespace ConsoleApplication7
{
@nebtrx
nebtrx / flask_migrate_steps
Created December 28, 2015 22:29
Migration steps with Flask-Migrate
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py db upgrade
@nebtrx
nebtrx / python_virtual_env
Created December 30, 2015 16:14
Python Virtual Env Steps
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
..
..
..
$ deactivate
# See commit changes
git whatchanged -m -n 1 -p <sha of merge commit>
# Delete branch
git branch -d the_local_branch
# Delete remote branch
git push origin --delete <branchName>
@nebtrx
nebtrx / Enabling Gradle Daemon on UNIX based OS
Created January 20, 2016 22:50
Enabling Gradle Daemon on UNIX based OS
touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties

Quick Instructions for using the harvest lint:

  1. Unpack the compressed file.
  2. cd into the uncompresed harvest-lint directory
  3. Fill the harvest-projects.yaml file following instructions from here
  4. Edit run-linter file and replace the placeholders in the following section with real information
export HARVEST_USERNAME=<account_username>
export HARVEST_PASSWORD=
# open/edit the GHC compiler seetings
code $(stack ghc -- --print-libdir)/settings
# searh process using the port
lsof -i tcp:<port>
# kill a process
sudo kill -9 <pid>
# list process
@nebtrx
nebtrx / atom-haskell
Created March 18, 2017 22:10
Atom Haskell related configurations
stack --no-system-ghc --install-ghc build ghc-mod hlint stylish-haskell
@nebtrx
nebtrx / modified-garret-theme
Created November 21, 2017 02:18
modified-garret-theme
#!/usr/bin/env zsh
#
# Garrett Zsh Theme for Prezto
# Created with modified code by Chauncey Garrett - @chauncey_io
#
# http://chauncey.io/projects/zsh-prompt-garrett/
#
# A prompt with the information you need the moment you need it.
#
# This prompt has the following features:
object game {
case class Lens[S, A](set: A => S => S, get: S => A) { self =>
def >>> [B](that: Lens[A, B]): Lens[S, B] =
Lens[S, B](
set = (b: B) => (s: S) => self.set(that.set(b)(self.get(s)))(s),
get = (s: S) => that.get(self.get(s))
)
}
case class Prism[S, A](set: A => S, get: S => Option[A]) { self =>