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/php -q | |
<?php | |
// Disable errors | |
error_reporting(0); | |
foreach ($argv as $user) { | |
if ($user !== $argv[0]) { |
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 | |
DAYS=5 | |
# Calculate the threshold value | |
THRESHOLD=$(($DAYS * 24 * 60 * 60)) | |
# Set current time | |
TIMESTAMP=$(date +%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
! Set key codes | |
keycode 37 = Control_L | |
keycode 105 = Control_R | |
keycode 64 = Super_L | |
keycode 108 = Super_R | |
keycode 133 = Alt_L | |
keycode 134 = Alt_R | |
keycode 191 = Print | |
! Clear key modifier mappings |
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
// -------------------------------------------------------------------------- // | |
// -----| PERFORMANCE |------------------------------------------------------ // | |
// -------------------------------------------------------------------------- // | |
fps_max 200 | |
@panorama_max_fps 200 | |
@panorama_vsync 0 | |
echo "/* ---------------------------------------------------- */" |
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 | |
$date = date('M d, Y - h:i A', 499155600); // Oct 26, 1985 - 01:20 AM | |
$libyans = false; | |
$speed = 0; | |
$watts = 1210000000; | |
while ($libyans == true) { | |
if ($speed >= 88 && $watts == 1210000000 ) { |
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
import os | |
import time | |
path = "E:\\Downloads" | |
now = int(time.time()) | |
dirList = os.listdir(path) | |
for fileName in dirList: | |
filePath = path + "\\" + fileName |
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 | |
for ($x = 1; $x <= 100; $x++) { | |
if ($x % 3 === 0 && $x % 5 === 0) { | |
echo 'FizzBuzz'; | |
} elseif ($x % 3 === 0) { | |
echo 'Fizz'; | |
} elseif ($x % 5 === 0) { | |
echo 'Buzz'; |
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 | |
function randColor() { | |
$randDec = rand(0, 16777215); | |
$randHex = dechex($randDec); | |
$color = '#' . $randHex; | |
return $color; | |
} |
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/env bash | |
set -o errexit pipefail | |
WORKSPACE=${HOME}/workspace # Path to your workspace | |
find ${WORKSPACE} -name '.git' -type d | while read LINE; do | |
pushd "${LINE}/../" | |
git fsck && git gc | |
popd | |
done |
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/env python | |
import httplib | |
import sys | |
import os | |
import ftplib | |
# File IP will be output to | |
file="ip.txt" | |
# Replace server, user, and password with your login information |