Skip to content

Instantly share code, notes, and snippets.

View rcguy's full-sized avatar

rcguy

  • 127.0.0.1
View GitHub Profile
anonymous
anonymous / config.json
Created October 12, 2015 22:11
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@zachbrowne
zachbrowne / Ubuntu Commands
Last active January 1, 2016 07:39
List of useful Ubuntu commands to discover information about the server.
Handy bash commands for finding out stuff in Linux:
# Clean up webserver permissions
find /var/www/* -type d -exec chmod 755 {} \; && find /var/www/* -type f -exec chmod 644 {} \; && chown -R www-data:www-data /var/www/*
# Add User and Add to Sudo
adduser zach
usermod -a -G sudo exampleuser
# Find CPU specifications
@IT07
IT07 / Server_WelcomeCredits
Last active July 6, 2016 18:32
[GitHub] DayZ Server Credits by IT07
// FILENAME: server_WelcomeCredits.sqf
// =====
// SCRIPT NAME: Server Intro Credits Script by IT07
// SCRIPT VERSION: v1.3.7 BETA
// Credits for original script: Bohemia Interactive http://bistudio.com
// ========== SCRIPT CONFIG ============
_onScreenTime = 6; //how long one role should stay on screen. Use value from 0 to 10 where 0 is almost instant transition to next role
//NOTE: Above value is not in seconds. It is percentage. Default: 6
@imjacobclark
imjacobclark / upload-form.php
Created May 13, 2012 09:44
Multiple Image Uploader Using MongoDB To Store Image Paths
<form name="newad" method="post" enctype="multipart/form-data" action="uploader.php">
<br/>
<label for="file">Image 1:</label>
<input type="file" name="file" id="file" />
<label for="file">Image 2:</label>
<input type="file" name="file2" id="file2" />
<label for="file">Image 3:</label>
<input type="file" name="file3" id="file3" />
@brucekirkpatrick
brucekirkpatrick / getFilesInDirectoryAsArray.php
Last active December 2, 2017 04:54
Function to return only the files in a directory, and optionally do this recursively.
<?php
function getFilesInDirectoryAsArray($directory, $recursive, $arrFilter=array()) {
$arrItems = array();
if(substr($directory, strlen($directory)-1, 1) != "/"){
$directory.="/";
}
if(count($arrFilter)){
$filterMap=array();
for($i=0;$i<count($arrFilter);$i++){
$filterMap[$arrFilter[$i]]=true;
@stevenmirabito
stevenmirabito / owncloud-nginx-pretty-urls.conf
Last active April 2, 2018 13:11
Nginx configuration for ownCloud with support for URL rewriting (https://github.com/owncloud/core/pull/14081)
upstream php-fpm {
# Path to PHP-FPM socket
server unix:/var/run/php-fpm/php-fpm.sock;
}
server {
# Listen on port 80 for non-SSL connections
listen 80;
server_name YOURDOMAIN.XYZ;
@pauliusdotpro
pauliusdotpro / DisableVehiclePeds.txt
Last active November 6, 2018 11:37
Disables all autospawning vehicles, peds
Citizen.CreateThread(function()
while true
do
-- These natives has to be called every frame.
SetVehicleDensityMultiplierThisFrame(0.0)
SetPedDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
@zachbrowne
zachbrowne / .bashrc
Created July 31, 2013 13:51
Custom .bashrc File for Ubuntu
PS1='\[\033[1;31m\]\W/\[\033[0m\] '
##### DEFAULTS #####
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
PROMPT_COLOR='35;1m'
export HISTCONTROL=ignoreboth
@jayde
jayde / PHP Password Protect Website
Created July 4, 2013 16:32
PHP Basic Site Authentication / Password Protect
<?
header("Content-type: text/html; charset=utf-8");
if(empty($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm=""');
header('HTTP/1.0 401 Unauthorized');
echo 'Login and Password Required';
exit;
} else {
echo "Username: ".$_SERVER['PHP_AUTH_USER']."<br>";
echo "Password: ".$_SERVER['PHP_AUTH_PW']."<p>";
@feczo
feczo / putty-gce.md
Last active July 23, 2020 13:14
How to use Compute Engine - GCE with putty