Skip to content

Instantly share code, notes, and snippets.

View kentfredric's full-sized avatar
🤔

Kent Fredric kentfredric

🤔
View GitHub Profile
@kentfredric
kentfredric / eapi5.pl
Last active August 29, 2015 14:18 — forked from monsieurp/eapi5.pl
#!/usr/bin/perl
use warnings;
use strict;
use Term::ANSIScreen qw/cls/;
use POSIX qw/strftime/;
use feature 'say';
# Current year.
my $year = strftime '%Y', gmtime;
import graph.Vertex;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Stack;
public class ShortestVertex {
private int num_vertices;
private int start;
#!/bin/bash
BIN=LightTable
HERE=$PWD
ULIBS="$HERE/lib";
#UDEV_SRC=http://distfiles.gentoo.org/distfiles/google-chrome-libudev-0.13.1-x86.tar.xz
UDEV_SRC=http://distfiles.gentoo.org/distfiles/google-chrome-libudev-0.13.1-amd64.tar.xz
if [[ ! -e "$ULIBS" ]]; then
@kentfredric
kentfredric / question.php
Created November 22, 2012 00:54 — forked from anonymous/question.php
IT"S EVEN MORE BEAUTIFUL
<?php
class Question {
public $questionName;
public $choiceValue;
public function __construct($questionName, $choiceValue){
$transtbl = array(
@kentfredric
kentfredric / survey.php
Created November 22, 2012 00:28 — forked from anonymous/survey.php
WIP: Survey question summary, based on older Countries MVC model.
<?php
require_once 'models/question.php';
require_once ("dbconfig.php");
class Model {
private function summary_stats() {
@kentfredric
kentfredric / reggrephash.pl
Created February 28, 2012 22:43 — forked from Getty/reggrephash.pl
Benchmarking Regexp vs. Grep vs. Hash for "finding"
#!/usr/bin/env perl
use Benchmark qw( cmpthese );
my @prein = (
qw( bar baz foo )
);
my @preout = ( qw( bar baz boo ) ) ;
my %in = (
@kentfredric
kentfredric / dupe-stdin-perl.pl
Created November 16, 2011 17:08
stupid filehandle tricks
seek*DATA,0,1-open*STDIN,'<&=DATA';print"^_^\n";exec'perl -x';__DATA__
#!/usr/bin/env python
lah de
magical code dah
#!perl
print "Not as magical as you think\n";
seek*STDIN,0,0;exec'perl'
@kentfredric
kentfredric / dupe-stdin-perl.pl
Created November 16, 2011 16:55
stupid filehandle tricks
seek*DATA,0,1-open*STDIN,'<&=DATA';print"^_^\n";exec'perl';__DATA__