- links.rb
- update_error.rb
- response.rb
- parse.rb
- http.rb
- currency.rb
- version.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork git@github...my-fork.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# How to use: | |
# | |
# LE_HOSTED_ZONE=XXXXXX LE_AWS_PROFILE=dns-access ./letsencrypt.sh --cron --domain example.org --challenge dns-01 --hook /tmp/hook-dns-01-lets-encrypt-route53.py | |
# | |
# More info about letsencrypt.sh: https://github.com/lukas2511/letsencrypt.sh/wiki/Examples-for-DNS-01-hooks | |
# Using AWS Profiles: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles | |
# Obtaining your Hosted Zone ID from Route 53: http://docs.aws.amazon.com/cli/latest/reference/route53/list-hosted-zones-by-name.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery.require - Require/include plugin for including necessary scripts | |
* | |
* Copyright (c) 2010, James Gregory (james@jagregory.com) | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that | |
* the following conditions are met: | |
* | |
* o Redistributions of source code must retain the above copyright notice, this list of conditions and the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a) | |
if (items != null) | |
collection.AddRange(items) | |
// b) | |
collection.AddRange(items ?? new Foo[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data_dir = "/var/lib/kapacitor" | |
default-retention-policy = "" | |
hostname = "localhost" | |
skip-config-overrides = false | |
[[influx]] | |
default = true | |
disable-subscriptions = false | |
enabled = true | |
http-port = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jagregory on github. | |
* I am jagregory (https://keybase.io/jagregory) on keybase. | |
* I have a public key ASCT_URSYIVBOt_t39fImDTV5QPP4NK0A2HNp2iLpJ8fLQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AutoMapperExtensions | |
{ | |
public static void NullSafeMapFrom<T, TResult>(this IMemberConfigurationExpression<T> opt, Expression<Func<T, TResult>> sourceMemberExpression) | |
{ | |
var sourceMember = sourceMemberExpression.Compile(); | |
opt.MapFrom(src => | |
{ | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package parser | |
import "database/sql" | |
type Row struct { | |
MenuId int | |
Menu sql.NullString | |
Submenu sql.NullString | |
Item sql.NullString | |
Parent int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var projections = Object.keys(serverData) | |
.map(function(k) { | |
return serverData[k].totals.map(function(t, i) { | |
var row = { y: i + 1 } | |
row[serverData[k].commissionStructure] = t.total.value | |
return row | |
}) | |
}) | |
var result = projections[0] |
NewerOlder