Skip to content

Instantly share code, notes, and snippets.

View khamer's full-sized avatar

Kevin Hamer khamer

View GitHub Profile
This file has been truncated, but you can view the full file.
["A ____ atom in an atomic clock beats 9,192,631,770 times a second", "cesium"]
["A ____ generates temperatures five times hotter than those found on the sun's surface", "lightning bolt"]
["A ____ is a pact between a secular authority & the church", "concordat"]
["A ____ is the blue field behind the stars", "canton"]
["A ____ occurs when all the planets of the our Solar System line up", "sysygy"]
["A ____ razor removed from King Tut's Tomb was still sharp enough to be used", "golden"]
["A ____ takes 33 hours to crawl one mile", "snail"]
["A ____ women can get a divorce if her husband doesn't give her coffee", "saudi arabian"]
["A ____ written to celebrate a wedding is called a epithalamium", "poem"]
["A 'dybbuk' is an evil spirit in which folklore", "jewish"]
@khamer
khamer / testfile.php
Created August 18, 2017 23:30
useless test file
<?php
$foo = preg_replace('foo$1', "one two three four five {$six} seven eight nine ten", &$test);
$then = ["testing", "this", "out"];
?>
<div>
<span class="foobar-attributes <?= $test ?>">cheese</span>
</div>
<?php
$foo = preg_replace('foo$1', "one two three four five {$six} seven eight nine ten", &$test);
$then = ["testing", "this", "out"];
@khamer
khamer / config
Created March 2, 2017 14:06
i3 config snippet with different examples of symbols for up to eight workspaces
## Roman Numerals
#set $ws1 1:Ⅰ
#set $ws2 2:Ⅱ
#set $ws3 3:Ⅲ
#set $ws4 4:Ⅳ
#set $ws5 5:Ⅴ
#set $ws6 6:Ⅵ
#set $ws7 7:Ⅶ
#set $ws8 8:Ⅷ
@khamer
khamer / php.vim
Created March 16, 2016 20:20
.vim/indent/php.vim
" THIS IS MODIFIED, and IN PROGRESS. I'll make it more official when I'm ready.
"
" Vim indent file
" Language: Php
" Authors: Miles Lott <milos@groupwhere.org>, Johannes Zellner <johannes@zellner.org>, Pim Snel <pim@lingewoud.nl>
" URL: http://www.vim.org/scripts/script.php?script_id=604
" URL: http://lingewoud.nl/downloads.php
" Last Change: 23 feb 2004
" Version: 0.3
" Notes: This is a combination of the PHP indent file of Miles Lott with
<title>worst.PHP</title>
<body>
<script language="php">
isset($_REQUEST[user]) or $_POST[user] = null;
extract($_REQUEST);
if ($user):
eval("goto greeting");
else:
goto welcome_form;
@khamer
khamer / ExampleDatabase.php
Last active August 29, 2015 14:05
Example using Dependency Injection
<?php
class ExampleDatabase {
private $db = null;
public function __construct($connection_string)
{
$this->db = pg_connect($connection_string);
}
@khamer
khamer / ExampleDatabase.php
Last active August 8, 2022 09:41
Example of a Singleton Class
<?php
class ExampleDatabase {
static private $instance = null;
static public function getInstance()
{
if (self::$instance === null) {
self::$instance = new self();
@khamer
khamer / ExampleDatabase.php
Last active August 29, 2015 14:05
Example of a Static Class
<?php
class ExampleDatabase {
static private $db = null;
static public function connect($connection_string)
{
return self::$db = pg_connect($connection_string);
}
░█▀█░█▀█░█▀▄░▀█▀░░░▀█▀░█▀█░█░█░█▀▀░█▀▄░█▀█ BURGERS: 0
░█▀▀░█░█░█▀▄░░█░░░░░█░░█▀█░▀▄▀░█▀▀░█▀▄░█░█
░▀░░░▀▀▀░▀░▀░░▀░░░░░▀░░▀░▀░░▀░░▀▀▀░▀░▀░▀░▀ FRIES: 0
░█░░░█▀▀░█░█░▀█▀ BURGERS: 0
░█░░░█▀▀░▄▀▄░░█░
░▀▀▀░▀▀▀░▀░▀░▀▀▀ FRIES: 0
hamburgers.txt
Seventeen State Street
Five Guys
The Port Tavern
Lexi's
Loretta's
Port City