server { | |
# see: http://wiki.nginx.org/Pitfalls | |
# see: http://wiki.nginx.org/IfIsEvil | |
listen 80; | |
root /app; | |
index index.html index.htm index.php; | |
error_page 404 /index.php; | |
# Make site accessible from http://set-ip-address.xip.io |
# SSL request to hostname that is not in DNS | |
> curl -o /dev/null -w @curlformat https://beta.finance.yahoo.com | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 255k 0 255k 0 0 233k 0 --:--:-- 0:00:01 --:--:-- 233k | |
Size: 261255 | |
DNS: 0.522 | |
Connect: 0.536 |
#!/usr/bin/env python | |
"""A noddy fake smtp server.""" | |
import smtpd | |
import asyncore | |
class FakeSMTPServer(smtpd.SMTPServer): | |
"""A Fake smtp server""" | |
def __init__(*args, **kwargs): |
public class AccountAuthenticator extends AbstractAccountAuthenticator { | |
private final Context context; | |
@Inject @ClientId String clientId; | |
@Inject @ClientSecret String clientSecret; | |
@Inject ApiService apiService; | |
public AccountAuthenticator(Context context) { | |
super(context); |
from fabric.api import local, run, env, put | |
import os, time | |
# remote ssh credentials | |
env.hosts = ['10.1.1.25'] | |
env.user = 'deploy' | |
env.password = 'XXXXXXXX' #ssh password for user | |
# or, specify path to server public key here: | |
# env.key_filename = '' |
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
#!/bin/bash | |
# Personal note : add rules to /etc/rc.local file so they will be loaded after booting up | |
# Change modemif to your network interface value | |
modemif=eth0 | |
iptables -t mangle -N ack | |
iptables -t mangle -A ack -m tos ! --tos Normal-Service -j RETURN | |
iptables -t mangle -A ack -p tcp -m length --length 0:128 -j TOS --set-tos Minimize-Delay | |
iptables -t mangle -A ack -p tcp -m length --length 128: -j TOS --set-tos Maximize-Throughput |
This creates a package which runs an install.sh
which copies a file somewhere
the below is entirely incorrect.
Hopefully I'll get around to fixing it
tip: this would install to the root dir & the relative path to ./install.sh would be wrong
go to project directory
cd /path/to/project