This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install git | |
sudo apt-get build-dep git-core -y | |
wget http://kernel.org/pub/software/scm/git/git-1.6.0.6.tar.gz | |
tar xvzf git-1.6.0.6.tar.gz | |
cd git-1.6.0.6 | |
cd git-1.6.0.6 && ./configure | |
cd git-1.6.0.6 && make | |
cd git-1.6.0.6 && sudo make install | |
rm git-1.6.0.6.tar.gz | |
rm -Rf git-1.6.0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Download this script in /root/neutrinet-connectivity-fix.sh | |
# 2. chmod +x neutrinet-connectivity-fix.sh | |
# 3. echo "*/5 * * * * root /sbin/ifconfig tun0 > /dev/null 2>&1 || /root/neutrinet-connectivity-fix.sh > /dev/null 2>&1" > /etc/cron.d/restart_vpn | |
# 4. This file should contain: | |
# * * * * * root /sbin/ifconfig tun0 > /dev/null 2>&1 || /root/neutrinet-connectivity-fix.sh | |
# Remark: test cron job by doing: run-parts -v /etc/cron.d | |
echo "stopping firewall..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Heroku S3 Database backup task | |
# by Nick Merwin (Lemur Heavy Industries) 10.08.09 | |
# * dumps db to yaml, gzip's and sends to S3 | |
# | |
# Setup: | |
# 1) replace APP_NAME and BACKUP_BUCKET with your info | |
# 2) add config/s3.yml like so (same as Paperclip's): | |
# production: | |
# access_key_id: ... | |
# secret_access_key: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dummy_pwd=neutrinet | |
clear | |
cat <<EOF | |
******************************************************************************** | |
You are about to configure an Internet Cube for Neutrinet. | |
All the passwords; yunohost admin account, openvpn password and the password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -- change this to match your config | |
XCODE_BUILD_PATH="/Xcode4/usr/bin/xcodebuild" | |
# -- constants | |
BENCHMARK_PATH="$HOME/Desktop/BENCHMARK_THREE20" | |
REPOS_URL="https://github.com/facebook/three20.git" | |
COMMIT="6fecb7e39b7590173410d24086afb7aef8581f54" | |
PROJECT_PATH="three20/samples/TTCatalog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# En ligne de commande | |
$ sudo openvpn neutrinet.ovpn | |
Sat Jan 16 13:08:01 2016 OpenVPN 2.3.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec 1 2014 | |
Sat Jan 16 13:08:01 2016 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08 | |
Sat Jan 16 13:08:01 2016 UDPv4 link local: [undef] | |
Sat Jan 16 13:08:01 2016 UDPv4 link remote: [AF_INET]80.67.188.194:1194 | |
Sat Jan 16 13:08:01 2016 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this | |
Sat Jan 16 13:08:02 2016 [vpn.neutrinet.be] Peer Connection Initiated with [AF_INET]80.67.188.194:1194 | |
Sat Jan 16 13:08:04 2016 TUN/TAP device tun0 opened |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage example: | |
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png | |
// | |
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]]; | |
// .h | |
@interface UIImage (IPImageUtils) | |
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@last_modified_post = Post.find(:first, :order => "updated_at DESC") | |
expires_in 0, :public => true | |
if @last_modified_post.nil? || stale?( :etag => @last_modified_post, | |
:last_modified => @last_modified_post.updated_at.utc, | |
:public => true) | |
logger.error("--\n\n--LAST MODIFIED #{@last_modified_post.updated_at.utc}--\n\n--") | |
logger.error("--\n\n--INVALID CACHE at #{Time.now.utc}--\n\n--") | |
logger.error("--\n\n--STALE : #{stale?(:last_modified => @last_modified_post.updated_at.utc, :public => true)}--\n\n--") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@last_modified_post = Post.find(:first, :order => "updated_at DESC") | |
if @last_modified_post.nil? || stale?( :etag => @last_modified_post, | |
:last_modified => @last_modified_post.updated_at.utc, | |
:public => true) | |
@posts = Post.find(:all) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index | |
@last_modified_post = Post.find(:first, :order => "updated_at DESC") | |
response.headers['Cache-Control'] = "public, must-revalidate" | |
if @last_modified_post.nil? || stale?( :etag => @last_modified_post, | |
:last_modified => @last_modified_post.updated_at.utc, | |
:public => true) | |
@posts = Post.find(:all) | |
end | |
end |
NewerOlder