Skip to content

Instantly share code, notes, and snippets.

View sreynen's full-sized avatar

Scott Reynen sreynen

View GitHub Profile
@sreynen
sreynen / 1.py
Last active December 18, 2021 19:26
Advent of Code 2021
file = open('1a.txt', 'r')
depths = [int(line) for line in file.readlines()]
# Part A
def increases(values):
return [value for index, value in enumerate(values)
if index > 0 and value > values[index - 1]]
print(len(increases(depths)))
@sreynen
sreynen / public key
Last active December 10, 2018 15:34
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0NfX1FwqvwosrcAu3N+1LaTdouY+/pGinRCFCqw5Og3+UlKzF3JjhuB1jbYEn5gi4OGi2ONRbyg4yVrzlPr+JhFnKRqPVmzuue7oru9l5mdh3YWFgizAKkMIaArTpzHO3+PKmDLuHpQDGbwtT2GK3M5SB5bc4DE0rrVXpxFWg2yocth2uG5y4uv1umVkTrzXw2Gew2a9vzshunS+Mr4PISDarAvCQBdedUaZIDZ3m9qoIUa1aZymrmoH46RMvs/BKfwjNg2pPNem0jPgnE+qkgGXiwt2bo9ABEOJkiFI8sJOHBfHprmS0bQdMPHPCGcjv/bjlL0eKmhZ0wOnxgvKiw== [email protected]

Keybase proof

I hereby claim:

  • I am sreynen on github.
  • I am scottreynen (https://keybase.io/scottreynen) on keybase.
  • I have a public key whose fingerprint is 17B3 6131 4DA0 095B 6424 AD65 8EE0 C953 AEF9 E72D

To claim this, I am signing this object:

import React from 'react'
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
import ReactDOM from 'react-dom'
class Example extends React.Component {
render() {
return (
<Router>
<div>
@sreynen
sreynen / helpInSilex.md
Last active August 29, 2015 14:25
How to use SimpleThingsFormExtraBundle HelpExtension in Silex

1

This goes in your app.php, after you register FormServiceProvider:

$app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function ($extensions) use ($app) {
    $extensions[] = new SimpleThings\FormExtraBundle\Form\Extension\FieldTypeHelpExtension();
    return $extensions;
}));
@sreynen
sreynen / content_types.php
Last active August 29, 2015 14:04
Quick Drupal 8 Content Type Creator
<?php
/**
* Creates a tar file.
* Directly copied from features_tar_create().
*/
function create_tar($name, $contents) {
/* http://www.mkssoftware.com/docs/man4/tar.4.asp */
/* http://www.phpclasses.org/browse/file/21200.html */
$tar = '';
@sreynen
sreynen / basecamp.php
Created August 2, 2012 15:06
Time report
<?
require_once('basecamp/Basecamp.class.php'); // see http://code.google.com/p/basecamp-php-api/
$bc = new Basecamp('https://[subdomain].basecamphq.com/','[username]','[password]', 'simplexml');
$people = $bc->getPeopleForCompany([company ID]);
$person_id = array();
foreach ($people['body']->person as $person) {