Skip to content

Instantly share code, notes, and snippets.

View sycobuny's full-sized avatar

Stephen Belcher sycobuny

  • Kelly Services, NIH/NIA
  • Baltimore, MD
View GitHub Profile
@sycobuny
sycobuny / captions.sbv
Created July 31, 2015 19:46
Closed Captioning File for YouTube video at https://www.youtube.com/watch?v=-mr9WOI1jK0
0:00:00.160,0:00:01.780
[Amustela]: Please welcome to the stage...
0:00:01.780,0:00:03.960
[Amustela]: From Baltimore, Maryland...
0:00:05.300,0:00:09.640
[Amustela]: The magnificent Dark Phoenix...
0:00:09.640,0:00:13.340
@sycobuny
sycobuny / transcript.md
Created July 31, 2015 19:37
Transcription (so far) of my "Motion Commands" talk

Today I'm going to do a presentation, for some reason sillily [sic] titled "Around the File in 80 Keys". I'm actually not going to go over 80 different keys you can use to navigate in Vim, I'm just going to go over a few. There might not even be 80 keystrokes in the presentation itself. But, I thought it was cute.

But first, I actually wanted to say thank you to all of you who have come tonight, it's the first meetup of this kind that I've setup, and I hope that it's educational, or entertaining, or worthile. But, if there are any suggestions you have, comments, or particularly my favorite thing you could

@sycobuny
sycobuny / .tmux.conf
Created June 4, 2015 15:55
Mapping new keys for resizing windows
# Allows us to resize windows with WASD like a video game
# Primarily useful when we're on a system with a vanilla setup (no option-as-Meta Key enabled)
# Note that these are upper-case letters - tmux is case-sensitive
bind-key -r W resize-pane -U 5
bind-key -r A resize-pane -L 5
bind-key -r S resize-pane -D 5
bind-key -r D resize-pane -R 5
@sycobuny
sycobuny / gen-key.bash
Last active March 29, 2024 20:31
Quick script to generate new GPG keys (and export pertinent details)
#!/bin/bash
# Print a welcome banner for the user.
function Welcome() {
echo ""
echo "================================"
echo "Welcome to the GPG Key Generator"
echo "================================"
echo "Please select a STRONG passphrase. Once entered and verified, the"
echo "system must generate and collect enough random data to create your"
MyApp = angular.module('my-app', [])
MyApp.run(function($rootScope) {
testFactory.callFakeAJAX().success(function(response) {
console.log(response.data)
})
})
/***********
* MOCKING *
***********/
@sycobuny
sycobuny / new.sql
Created August 12, 2014 18:22
Just my new style of query writing
SELECT
a.column1 AS a_col1,
a.column2 AS a_col2,
b.column1 AS b_col1,
b.column2 AS b_col2
FROM
asdf a INNER JOIN
qwerty b ON
a.id = b.qwerty_id
WHERE
# we assume $dbh gets assigned somewhere else
sub do_query {
my ($name, $wildcard) = @_;
my ($sth) = $dbh->prepare(<<<QUERY);
SELECT *
FROM some_table
WHERE name = ? AND
address LIKE CONCAT('%', ?, '%');
QUERY
<?php
$output = '';
foreach (scandir(session_save_path()) as $x => $dir) {
if (!preg_match('/^sess_(.*)/', $dir, $matches)) continue;
ob_start();
session_id($matches[1]);
session_start();
@sycobuny
sycobuny / migrate.php
Created April 22, 2014 13:06
An iteration of my migrator script for PHP
<?php
/**
* Set up the database connection. Note that these require either a
* connection string be provided by the $PHP_DATABASE_STR env variable, a
* filename be provided by the $PHP_CONNECTION_SCRIPT variable, or a
* filename matching the parameters demanded by
* Migrator::default_connection_script(), the latter two of which must
* exist, or the script will fail at this point.
*/
10
Argument "hello" isn't numeric in addition (+) at test.pl line 9.
1