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
#!/usr/bin/python | |
# | |
# Extract video files from source video based on array of timestamps | |
# | |
# times - array of times we are extracting, from times[x] to times[x + 1] | |
# src - src file | |
# dest - destination file | |
# | |
import os | |
from timecode import Timecode |
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/sh | |
# | |
# Clips a video file and removes audio | |
# | |
# $1 - the path to the movie we're converting. | |
# $2 - destination of the clipped result | |
# $3 - the start time of the finished product. | |
# This can be in seconds, or it also accepts the "hh:mm:ss[.xxx]" format. | |
# $4 - the duration of the video sequence. | |
# This can be in seconds, or it also accepts the "hh:mm:ss[.xxx]" format. |
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
find . -type f \( -iname '*.jpg' -o -iname '*.png' -o -iname '*.gif’ -o -iname ‘*.tif' \) -exec jhead -n%Y-%m-%d\ %H-%M-%S {} \; |
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 | |
echo -n 'Are you in the root of the WordPress install? [Y/n]:' | |
read wproot | |
echo -n "WordPress Owner: " | |
read wpowner | |
echo -n "WordPress Group: " | |
read wpgroup |
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
To export | |
If it's an entire DB, then: | |
$ mysqldump -u [uname] -p[pass] db_name > db_backup.sql | |
If it's all DBs, then: | |
$ mysqldump -u [uname] -p[pass] --all-databases > all_db_backup.sql | |
If it's specific tables within a DB, then: |
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
#!/usr/local/bin/python | |
import os | |
import sys | |
from datetime import datetime | |
NAMESPACE = 'TheServerBackup' | |
START = datetime.now() | |
TODAY = datetime.strftime(START, '%Y-%m-%d') |
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/sh | |
# install figlet to enable ASCII art | |
apt-get install figlet | |
# create directory | |
mkdir /etc/update-motd.d/ | |
# change to new directory | |
cd /etc/update-motd.d/ | |
# create dynamic files | |
touch 00-header && touch 10-sysinfo && touch 20-updates && touch 90-footer |
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
# pip install requests | |
# run it on a cron, the more clients you are looking, the longer the script takes | |
# currently it delays for 15 seconds between successful pings | |
import time | |
import pprint | |
## list of sites to track along with email address to send the alert | |
clients = [ | |
"http://www.website1.com", |
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/sh | |
## INSTALL HOMEBREW WITH THE FOLLOWING LINE | |
## First you need to install XCode and agree | |
## to the terms and service | |
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap homebrew/dupes | |
brew tap caskroom/versions |
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
<?php namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Request; | |
use View; | |
use App; | |
abstract class ApplicationsServiceProvider extends ServiceProvider | |
{ | |
public function register() |
OlderNewer