Skip to content

Instantly share code, notes, and snippets.

View scoutman57's full-sized avatar

Shannon Warren scoutman57

View GitHub Profile

Sync ./uploads/ with Amazon S3

This is a simple way to Sync a folder with Amazon S3 for a nightly backup - this is all to be done on your server :-)

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

# Install s3cmd

cd /etc/yum.repos.d/

@scoutman57
scoutman57 / README.md
Last active August 29, 2015 14:07 — forked from nikcub/README.md
@scoutman57
scoutman57 / interactive_video_test.html
Created October 9, 2014 23:27
YouTube Interactive Video Test
<!doctype html>
<html>
<head>
<title>Interactive video test</title>
</head>
<style type="text/css">
#playerContainer{
position:relative;
width:640px;
height:390px;
@scoutman57
scoutman57 / fedora_basic_install.sh
Created December 15, 2014 19:55
Fedora basic install
#!/bin/bash
rpm -qa|grep jredelete that dumb floating folder window
and i right click the menu and "classic style"
su root
vi /etc/sudoers # Set sudo users / enable no passwords
yum update
yum groupinstall 'KDE Plasma Workspaces'
yum groupinstall 'System Tools'
0
101
21012
3210123
432101234
54321012345
6543210123456
765432101234567
87654321012345678
9876543210123456789
@scoutman57
scoutman57 / gist:5bdc99e8373e3b275484
Created February 12, 2015 14:59
Restructure for gist.github.com/LinuxPhreak/30e6a71da2ef5fb27514
function getLawyers() {
$query = mysqli_query($con,"SELECT * FROM lawyers");
$lawyers = mysqli_fetch_assoc($query);
return $lawyers;
}
if (strtotime($lawyers['day']) < strtotime('-30 days') && $lawyers['paid'] = 1)
{
setPaid(0);
setAds(0);
<?php
/**
* Description of category_model
*
* @author jk
*/
class Index_Model extends Model {
public function __construct() {
@scoutman57
scoutman57 / validate.php
Last active August 29, 2015 14:20
Validate domain or email address
<?php
/**
* @param $domain
* @return mixed
*/
function validateDomain($domain)
{
$ip = filter_var(gethostbyname($domain), FILTER_VALIDATE_IP);
// Will return the IP address if or false if the domain is not valid
/*
0
909
89098
7890987
678909876
56789098765
4567890987654
345678909876543
23456789098765432
@scoutman57
scoutman57 / Connect_IBM_VPN.sh
Created July 28, 2015 03:35
Connect IBM VPN - Apple Script
#!/usr/bin/osascript
tell application "System Events"
tell current location of network preferences
set VPNservice to service "IBM VPN"
if exists VPNservice then connect VPNservice
end tell
end tell