Skip to content

Instantly share code, notes, and snippets.

Seth Lopez sethlopezme

Block or report user

Report or block sethlopezme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sethlopezme
sethlopezme / screencasting.md
Last active Nov 5, 2017
These are my notes and tips on screencasting.
View screencasting.md

Screencasting

These are my notes and tips on screencasting.

Tools

Mac

View serialization.rs
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum Scope {
Any,
Account,
Edit,
// ...
}
impl fmt::Display for Scope {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
View lib.rs
extern crate reqwest;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_urlencoded;
use std::collections::HashSet;
use std::fmt;
use serde::Serializer;
@sethlopezme
sethlopezme / common_mod.rs
Last active Dec 28, 2016
config/tests/common/mod.rs
View common_mod.rs
#![feature(plugin)]
#![plugin(rocket_codegen)]
// use rocket::config;
use rocket::http::Method;
use rocket::testing::MockRequest;
extern crate config as lib;
#[test]
@sethlopezme
sethlopezme / package.json
Last active Apr 12, 2018
Complete files for my article, Testing Hapi.js APIs. https://sethlopez.me/article/testing-hapi-js-apis
View package.json
{
"name": "testing-hapi-js-apis",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"test": "ava --verbose test.js"
},
"dependencies": {
"ava": "^0.16.0",
"hapi": "^15.1.1"
View keybase.md

Keybase proof

I hereby claim:

  • I am sethlopezme on github.
  • I am sethlopez (https://keybase.io/sethlopez) on keybase.
  • I have a public key ASARj60WtsGiHtRNL8Xw4gUxU9T1zqojCzDawBTRfG51PAo

To claim this, I am signing this object:

View package.json
{
"dependencies": {
"jshint": "latest",
"uglifyjs": "latest",
"watch": "latest"
},
"config": {
"github_url": "https://api.github.com/repos/MarkBiesheuvel/markbiesheuvel.nl/commits?page=1&per_page=10",
"maps_url": "https://maps.googleapis.com/maps/api/staticmap?size=640x200&zoom=7&markers=color%3Ablue%7Clabel%3AH%7C51.469941%2C5.472258&markers=color%3Ayellow%7Clabel%3AW%7C51.574344%2C5.13781",
},
@sethlopezme
sethlopezme / keymap.cson
Last active Jan 23, 2019
My Atom keymap for focusing and splitting panes, and moving pane items. Based on the shortcuts from the Origami (https://packagecontrol.io/packages/Origami) package for Sublime Text.
View keymap.cson
'.platform-darwin':
# focus pane
'cmd-k left': 'window:focus-pane-on-left'
'cmd-k right': 'window:focus-pane-on-right'
'cmd-k up': 'window:focus-pane-above'
'cmd-k down': 'window:focus-pane-below'
# split pane
'cmd-k cmd-left': 'pane:split-left'
'cmd-k cmd-right': 'pane:split-right'
'cmd-k cmd-up': 'pane:split-up'
@sethlopezme
sethlopezme / full-match.js
Last active Sep 30, 2019
Regex for matching any hex, rgb(a), or hsl(a) value. Assumes that you've lowercased the string and removed spaces.
View full-match.js
/^(#?([a-f\d]{3}|[a-f\d]{6})|rgb\((0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d)\)|rgba\((0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0|255|25[0-4]|2[0-4]\d|1\d\d|0?\d?\d),(0?\.\d|1(\.0)?)\)|hsl\((0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),(0|100|\d{1,2})%,(0|100|\d{1,2})%\)|hsla\((0|360|35\d|3[0-4]\d|[12]\d\d|0?\d?\d),(0|100|\d{1,2})%,(0|100|\d{1,2})%,(0?\.\d|1(\.0)?)\))$/
@sethlopezme
sethlopezme / README.md
Last active Aug 29, 2015 — forked from jxson/README.md
README.md template
View README.md

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

You can’t perform that action at this time.