Skip to content

Instantly share code, notes, and snippets.

View fernyb's full-sized avatar

Fernando Barajas fernyb

View GitHub Profile
@fernyb
fernyb / gist:f797dc4455770007cb9e43f2fbc4056e
Created August 22, 2017 19:04
React Native CFBundleIdentifier
When generating a project and react-native gives an error about CFBundleIdentifier not being found.
The following will fix that:
Go to File -> Project settings
Click the Advanced button
Select "Custom" and select "Relative to Workspace" in the pull down
Set Products Path: build/Build/Products
Set Intermediates: build/Build/Intermediates
click done, done
export GEM_HOME=~/.gem
export GEM_PATH=~/.gem
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
@fernyb
fernyb / scrape.rb
Created August 30, 2016 19:42
Capybara PhantomJS Poltergeist
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
options = {
:js_errors => false
}
Capybara::Poltergeist::Driver.new(app, options)
end
@fernyb
fernyb / gist:e09495d0c2100d548dee
Created February 9, 2016 19:22
config build.eventmachine
bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include
$ bundle install
@fernyb
fernyb / gist:624276146b883bc06086
Created January 13, 2016 19:32
Scapy installation fails on osx with dnet import error
Scapy installation fails on osx with dnet import error
http://stackoverflow.com/questions/26229057/scapy-installation-fails-on-osx-with-dnet-import-error
@fernyb
fernyb / gist:b5347b947b1c24d72ac2
Created December 2, 2015 19:44
Bash option parsing
DEBUG=false
UDID=0
while [[ $# > 0 ]]
do
key="$1"
#echo $key
case $key in
-d|--debug)
@fernyb
fernyb / pf_and_dns.txt
Created October 26, 2015 20:24 — forked from ef2k/pf_and_dns.markdown
Port Forwarding and Domain Tricks (MAC OSX Yosemite)
In /etc/hosts, add:
127.0.0.1 foo.com
Create /etc/pf.anchors/foo.conf
$sudo vim /etc/pf.anchors/foo.conf
rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 3000
Add this to /etc/pf.conf:
@fernyb
fernyb / gist:bc2e3461b06568b5d59b
Created October 7, 2015 18:59
fix homebrew when updating
cd $(brew --prefix)
git reset --hard HEAD
brew update
brew install youtube-dl
youtube-dl 'https://www.youtube.com/watch?v=kP1xeXMtF3A'