Skip to content

Instantly share code, notes, and snippets.

View numberwhun's full-sized avatar

Jefferson Kirkland numberwhun

View GitHub Profile
@numberwhun
numberwhun / process_config.pl
Created November 28, 2011 08:38
Process a configuration file
########################################################################################
# Process Configuration File
#
# First, open the file and apply a file handle.
# Second, take the next record and store in a variable
# Third, chomp to remove the newline
# Fourth, split the line on the separator (change if needed) and store in variables
########################################################################################
open(CONFIG, "./myfile.config");
@numberwhun
numberwhun / send_email.pl
Created November 28, 2011 08:39
Send Email with Perl
use Net::SMTP;
$smtp = Net::SMTP->new('here.com'); # connect to an SMTP server
$smtp->mail( 'user\@here.com' ); # use the sender's address here
$smtp->to('user\@there.com'); # recipient's address
$smtp->data(); # Start the mail
# Send the header.
$smtp->datasend("To: user\@there.com\n");
$smtp->datasend("From: user\@here.com\n");
@numberwhun
numberwhun / config.php.inc
Created November 28, 2011 09:08
Process Data Request From Form - With Database Connectivity and Searching: This is smart enough that it handles forms with multiple options to narrow search.
<?php
$host = 'localhost'; /* Set to location of mysql server */
$dbname = 'database_name';
$user = 'user_name';
$pwd = 'password';
?>
@numberwhun
numberwhun / gist:1399621
Created November 28, 2011 08:32
Time Stamp Code - Perl
# Some code for creating timestamps
@months = qw(01 02 03 04 05 06 07 08 09 10 11 12);
@weekDays = qw(01 02 03 04 05 06 07);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
$year = 1900 + $yearOffset;
$theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$month] $dayOfMonth, $year";
if ( $dayOfMonth > 9 )
{
@numberwhun
numberwhun / count_lines.pl
Created November 28, 2011 08:36
Count lines in a file
#!/usr/bin/perl
use strict;
use warnings;
######################################################################################
# Script: count.pl
# Author: Jefferson Kirkland
#
# Description:
@numberwhun
numberwhun / 403forbidden.php
Created November 28, 2011 11:53
Creating a Secure PHP Login Script
<?php
header('HTTP/1.1 403 Forbidden');
?>
<html>
<head>
<title>Congratulations! You have been DENIED access</title>
</head>
<body>
<font size="4">You have been denied access because of the following reasons:<br /><br />
1.) Too many failed login attempts, so you are likely brute forcing through logins.<br />
@numberwhun
numberwhun / clients.md
Created November 28, 2011 12:01 — forked from defunkt/clients.md
A list of Gist clients. Forked from https://gist.github.com/370230

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@numberwhun
numberwhun / promptcolor
Created March 12, 2012 10:01 — forked from jtmkrueger/promptcolor
color your prompt and show git branch
#color and git branch
parse_git_branch() {··
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export CLICOLOR=1
export GREP_OPTIONS="--color"
export LSCOLORS=gxfxcxdxbxegedabagacad
PS1='\n\[\e[1;36m\]\w \[\e[m\]\[\e[1;33m\]$(parse_git_branch)\[\e[m\] \n> '
This list includes beginner, intermediate and advanced ideas for projects. Happy coding and learning!
- In the USA yo have the following currency options:
100 Dollars
50 Dollars
20 Dollars
10 Dollars
5 Dollars
1 Dollar ( the 2 Dollar bill is very rare, ignore it)
25 cents ( the 50 cent coin is rare, also ignore it)
Various Degree Curriculum For Online Learning:
Open Source Society - Path to self-taught Computer Science: https://github.com/open-source-society/computer-science-and-engineering
Open Source Data Science Masters: http://datasciencemasters.org/
A Bachelor's Level Computer Science Curriculum: http://blog.agupieware.com/2014/05/online-learning-bachelors-level.html?showComment=1399602288548#c541541571334513499
An Intensive Bachelor's Level Computer Science Program Curriculum: http://blog.agupieware.com/2014/06/online-learning-intensive-bachelors.html