Skip to content

Instantly share code, notes, and snippets.

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

Felix Triller felixtriller

🏠
Working from home
View GitHub Profile
location ~* ^/s3/(.*) {
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>';
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>';
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>';
set $url_full "$1";
set_by_lua $now "return ngx.cookie_time(ngx.time())";
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full";
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign;
set_encode_base64 $aws_signature $aws_signature;
@felixtriller
felixtriller / rubymine.vmoptions
Created December 8, 2016 11:32
speed up rubymine
# ~/Library/Preferences/RubyMine2016.<VERSION>/rubymine.vmoptions
-Xms2g
-Xmx4g
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
# Restart RubyMine
LibMattrTest.setup do |config|
config.super_setting1 = 'hi there'
config.super_setting2 = 23
end
@felixtriller
felixtriller / parse.js
Last active August 29, 2015 14:21
parse page urls and status from WordPress dashboard
jQuery('#the-list').find('tr').each(function() {
var _this = jQuery(this);
var url = _this.find('.view').find('a').attr('href');
var status = _this.attr('class').match(/status[\w-]*\b/)[0].replace('status-', 'Status: ');
console.log(url + ' (' + status + ')');
});

Keybase proof

I hereby claim:

  • I am felixtriller on github.
  • I am felixtriller (https://keybase.io/felixtriller) on keybase.
  • I have a public key whose fingerprint is 1AF0 8CC8 6883 5F27 C3BB C375 F08B 1E05 29AC AE94

To claim this, I am signing this object:

@felixtriller
felixtriller / delicioustowordpress.php
Created February 14, 2011 22:16
This script fetches the latest links from Delicious and creates a WordPress post. And a little bit more.. :)
<?php
if ($_GET['key'] != '123456')
die('Nicht erlaubt.');
$file = './delicious2wordpress.data';
$read = fopen($file, 'r');
$line = intval(fgets($read, 64));
fclose($read);