Skip to content

Instantly share code, notes, and snippets.

View Pablo-Merino's full-sized avatar
🪛

Pablo Merino Pablo-Merino

🪛
View GitHub Profile
@Anachron
Anachron / wg_install.sh
Created June 24, 2019 07:15 — forked from sethenoka/wg_install.sh
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring a recursive local DNS server using Unbound
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# iptables-persistent currently requires user input
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y
@WDUK
WDUK / GBA4iOS 2.0 Install Instructions
Last active May 27, 2017 21:18
Install GBA4iOS 2.0 with Developer Credentials
Have a developer account?
Want to run GBA4iOS 2.0 without needing to change your device date all the time?
Here's what you do!
1. Safari: Download the ipa file direct
http://gba4iosapp.com/download/GBA4iOS.ipa
2. Terminal: Unzip the ipa (it's just a zip file after all)
unzip -q GBA4iOS.ipa

First, you install ruby-build and chruby. ruby-build is a program that knows how to download and build different ruby versions. chruby manages $PATH to control which ruby gets invoked in your shell. They work completely independently.

sudo su
cd /usr/src

git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
./install.sh
cd -
@Pablo-Merino
Pablo-Merino / config.ru
Created March 1, 2012 16:25
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
# We are not loading Active Record, nor the Assets Pipeline, etc.
# This could also be in your Gemfile.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
require "rails"
NSString *imageName =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] author]];
NSString *userImage =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] profileImage]];
NSArray *myArray = [userImage componentsSeparatedByString: @"/"];
NSString *fileName = (NSString*)[myArray lastObject];
NSString *picName =[NSString stringWithFormat:@"%@:%@", imageName, fileName];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"/ProfilePictures"];
NSString* path = [dataPath stringByAppendingPathComponent:picName];