Skip to content

Instantly share code, notes, and snippets.

View splitice's full-sized avatar

Mathew Heard splitice

View GitHub Profile
server {
listen 80;
server_name img.x4b.org;
root /var/www/image/;
}
# WinSCP script for uploading a single file
# see http://winscp.net/eng/docs/scripting for documentation on WinSCP scripting
# Automatically abort script on errors
option batch continue
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect to server (change this to match your connection settings)
@echo off
set path=%1
set folder=%date:~4,2%-%date:~7,2%-%date:~10,4%
For %%A in ("%path%") do (
Set Name=%%~nA
)
cd "C:\Program Files (x86)\WinSCP"
@splitice
splitice / pipe-redis-logs.php
Created January 19, 2014 12:25
unix fifo pipe -> redis
<?php
$fifo = '/rsyslog/pipe';
$max_length = 1024*8;
$redis_list_name = 'log_entries';
$redis_host = '127.0.0.1';
$redis_port = 6379;
$multi_bulk = 25;
$redis = new Redis();
$redis->connect($redis_host, $redis_port);
@splitice
splitice / deploy
Last active December 18, 2015 05:49
A deployment script for sites
#!/bin/bash
## EDIT HERE
DOMAIN="domain.com"
## NO NEED TO EDIT BELOW THIS LINE ##
# Copy to backup
cp dev.$DOMAIN ${DOMAIN}_c -R --preserve
#chmod 777 ${DOMAIN}_c -R