Skip to content

Instantly share code, notes, and snippets.

View Alric's full-sized avatar
🏠
Working from home

Al Tenhundfeld Alric

🏠
Working from home
View GitHub Profile
### Keybase proof
I hereby claim:
* I am alric on github.
* I am alric (https://keybase.io/alric) on keybase.
* I have a public key ASCcYWuBGK0HNrtKENhjmzm0yzBxDBAOW8LbX8vWeiEUMwo
To claim this, I am signing this object:
@Alric
Alric / gist:fd7c3207be72ee08957e9aebce5b0354
Created March 27, 2019 13:55 — forked from WintersMichael/gist:c70d195c5c5670d1625f
Shell one-liner to parse apache access logs and extract a unique URL list with hit count, querystring excluded.
cat access.log | awk -F\" '{print $2}' | awk '{print $2}' | sed '/^$/d' | sed 's/\?.*//g' | sort | uniq -c | sort -rn > url_hits.txt
@Alric
Alric / processGitHubHook.js
Created March 24, 2016 21:00 — forked from ijin/processGitHubHook.js
aws lambda function to process github hook from sns, add user to team, and notify by slack.
var aws = require('aws-sdk');
var kms = new aws.KMS({ region: 'us-east-1' });
var lambda = new aws.Lambda({region: 'ap-northeast-1'});
var encrypted_token = 'CiD0R0tv46w7LNpO0GlZpLfZk2O0Oy66IF83rG6olDY7yBKwAQEBAgB49EdL\nb+OsOyzaTtBpWaS32ZNjtDsuuiBfN6xuqJQ2O8gAAACHMIGEBgkqhkiG9w0B\nBwagdzB1AgEAMHAGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMsDOYHRzB\nN/5q/XCTAgEQgEOnHbGFykvpf06OQ1uQG9P5VjooLu8oSynMp9Cqt5SvaPUC\nKpHkPnnew8nKYhDIcxyLYd/A3vYsHZGWZ3FwN7kx0tIx\n';
var team_id = 1234567;
var valid_comment = 'join';
//console.log('Loading function');
exports.handler = function(event, context) {
@Alric
Alric / mandelbrot.sql
Last active August 29, 2015 14:25 — forked from rupey/mandelbrot.sql
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,

How many servings should I eat per day?

  • Fruit = 1-2 servings
  • Animal protein = 4 - 6 servings
  • Healthy fats = 5 - 9 servings
  • Healthy vegetables = 6 - 11 servings

How should I allocate my calories per day?

  • Healthy fats = 50%
{
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours
today, yet I never found any interesting article like yours.
{It’s|It is} pretty worth enough for me. {In my opinion|Personally|In
my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the
{internet|net|web} will be {much more|a lot more} useful
than ever before.|
I {couldn’t|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can’t} {in finding|find|to find} your
@Alric
Alric / bemerry.mkdn
Created December 7, 2011 15:17
beMerry Cville 2011

Hiya local software smarty,

We're throwing a party, and you're invited! Take a break from the holiday stress. Come hang out with your favorite local technologists and relax among like-minded friends.

What: beMerry
When: Thursday 12/15 6:00 PM - 9:00 PM (...and later)
Where: Rapture, private room in back
Who: Uh, duh, you and as many friends as you want.

So, you know about [beCamp] (http://barcamp.org/beCamp) and [beSwarm] (http://beswarm.org), right? They're local technology-agnostic events where we break out of our normal social circles and get to meet awesome new people.

@Alric
Alric / gist:1209810
Created September 11, 2011 16:50 — forked from toamitkumar/gist:952211
Inspect and test routes on console (Rails 3)
$ rails console
Loading development environment (Rails 3.0.6)
ruby-1.8.7-p334 :001 > r = Rails.application.routes
Gives you a handle of all the routes (config/routes.rb)
#Inspect a named route:
ruby-1.8.7-p334 :005 > r.recognize_path(app.destroy_user_session_path)
=> {:action=>"destroy", :controller=>"sessions"}