This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Text; // for class Encoding | |
namespace ClassCover.Api.Example | |
{ | |
public class API | |
{ |
This file contains hidden or 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/bash | |
ffmpeg -i SCRUM-2016-06-08.mov -vf scale=1024x768,setdar=16:9 -c:v libx264 -preset slow -profile:v main -crf 20 output-1024.mp4 |
This file contains hidden or 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 | |
# Take a snopshot of code and sym link it to a published apached location | |
# Created By: Javier Woodhouse | |
user=$1 | |
symbolic_path=$2 | |
source=$3 | |
date_part=`date +"%Y%m%d-%I%M%S"` | |
destination="$user.$date_part" |
This file contains hidden or 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 | |
# Take a snopshot of code and sym link it to a published apached location | |
# Created By: Javier Woodhouse | |
user=$1 | |
symbolic_path=$2 | |
source=$3 | |
date_part=`date +"%Y%m%d-%I%M%S"` | |
destination="$user.$date_part" |
This file contains hidden or 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 | |
printf "\nMemory Status\n" | |
ps aux | grep '^apache' | awk '{print $1, $2, $11, $6/1024 " MB";}' | |
printf "\nSum: " | |
ps aux | grep '^apache' | awk '{sum+= $6;} END {print sum/1024 " MB";}' | |
printf "Average: " | |
ps aux | grep '^apache' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB";}' |
This file contains hidden or 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/env perl | |
# See my post on http://stackoverflow.com/questions/33725298/perl-disable-shell-access | |
# Ref: https://github.com/Perl/perl5/blob/blead/lib/CORE.pod | |
BEGIN { | |
*CORE::GLOBAL::system = sub { | |
die('Do not use system calls.'); | |
}; |
This file contains hidden or 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/env perl | |
# Usage: | |
# perl echo.pl daemon | |
use Mojolicious::Lite; | |
get '/' => 'index'; | |
websocket '/echo' => sub { |
This file contains hidden or 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
' src: http://www.mcgimpsey.com/excel/removepwords.html | |
' | |
' Removing Internal XL passwords | |
' | |
' Note: For a discussion of File or VBA Project password protection, see here. | |
' | |
' Internal XL passwords are about as useful for security as tissue paper. The | |
' reason is that the passwords you enter (i.e., with Tools/Protect/Protect | |
' Worksheet or /Protect Workbook) are not used directly in protection. Instead | |
' they are hashed (mathematically transformed) into a much less secure code. |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
use WWW::Curl::Easy; | |
use File::Temp qw/tempfile/; | |
my ($out, $filename) = tempfile(); | |
my $curl = WWW::Curl::Easy->new(); | |
$curl->setopt(CURLOPT_URL, "https://github.com/libwww-perl/libwww-perl/archive/6.13.zip"); |
This file contains hidden or 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
-- Turn on table based logging | |
set global log_output = 'TABLE'; | |
-- Turn on general log | |
set global general_log = 'ON'; | |
-- Log everything to slow query log | |
set global log_slow_queries = 1; | |
set global long_query_time = 0.000001; |