Skip to content

Instantly share code, notes, and snippets.

🎯
Focused

Robin Hood fordarnold

🎯
Focused
Block or report user

Report or block fordarnold

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fordarnold
fordarnold / .bash_aliases
Created Jun 2, 2019
Common aliases for Bash terminal
View .bash_aliases
alias updt='sudo apt update && sudo apt -y upgrade && sudo apt autoclean && sudo apt autoremove && sudo reboot'
@fordarnold
fordarnold / TelecomNetworkExtensionsTableSeeder.php
Created Feb 12, 2015
Telecom network extensions for Africa
View TelecomNetworkExtensionsTableSeeder.php
<?php // Start somewhere !
class TelecomNetworkExtensionsTableSeeder extends Seeder {
public function run()
{
$faker = Faker::create();
$network_extensions = [
'Airtel Uganda' => '075',
@fordarnold
fordarnold / RandomColour.php
Created Jan 30, 2015
Generate a random Hex Colour Code in PHP
View RandomColour.php
function random_color_part() {
return str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT);
}
function random_color() {
return random_color_part() . random_color_part() . random_color_part();
}
echo random_color();
@fordarnold
fordarnold / laravel.4.2.composer.json
Created Oct 26, 2014
Include in your project directory and run "composer install" to install Laravel 4
View laravel.4.2.composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "4.2.*"
},
"autoload": {
@fordarnold
fordarnold / php-ext-test.php
Created Aug 18, 2014
PHP script to test for loaded PHP extensions/modules
View php-ext-test.php
<?php
$extension_name = 'mysql';
if (!extension_loaded($extension_name)) {
echo '<pre>'. $extension_name . ' not loaded</pre>';
}
else {
echo '<pre>'. $extension_name . ' is loaded</pre>';
}
@fordarnold
fordarnold / PassHash.php
Created Aug 16, 2014
Password Hashing PHP Class
View PassHash.php
<?php
/**
* Hashing user passwords
*
* @author Ravi Tamada
* @source http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-23/
*/
class PassHash{
@fordarnold
fordarnold / FizzBuzz.java
Last active Aug 29, 2015
Java Class for the popular Fizz-Buzz game :D
View FizzBuzz.java
/**
* FizzBuzz java class
*
* @author David Levine
* @source Quora.com
*
**/
public class FizzBuzz {
You can’t perform that action at this time.