Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Thiele sethiele

View GitHub Profile
View Unassigne-on-State-Change.js
var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');
exports.rule = entities.Issue.onChange({
title: workflow.i18n('Remove Assignee on move'),
guard: function(ctx) {
var issue = ctx.issue;
return issue.fields.isChanged(ctx.Stage);
},
action: function(ctx) {
@sethiele
sethiele / disable-shadow-on-mac-screenshots.md
Last active Jul 14, 2016
This is how to disable the shadow on mac screenshots.
View disable-shadow-on-mac-screenshots.md
  1. open th terminal
  2. run defaults write com.apple.screencapture disable-shadow -bool TRUE
  3. run killall SystemUIServer

Done

Enable the shaddow again (why ever):

  1. open th terminal
  2. run defaults write com.apple.screencapture disable-shadow -bool FALSE
View speedtest-cli-ext.rb
#!/usr/bin/env ruby
# Speedtest cli to ifttt.com wrapper
# based on https://github.com/HenrikBengtsson/speedtest-cli-extras
# More: https://www.iamyourfather.de/dsl-speedtest-mit-dem-raspberry-pi (german)
# Original: http://makezine.com/projects/send-ticket-isp-when-your-internet-drops/
require 'json'
secret_key = "XXXXXXXXXXX"
speedtest = `/usr/local/bin/speedtest-cli --share`
@sethiele
sethiele / wordpress-yoast-fokosword-sql.sql
Last active Sep 7, 2015
This SQL-Code returns a List of all Wordpress posts with a Yoast-SEO Fokus Keyword and the URL of the post. You Can download it as CSV (in MySQLAdmin).
View wordpress-yoast-fokosword-sql.sql
SET @domain="https://www.example.org/";
SELECT meta.post_id AS 'PostID', meta.meta_value AS 'Fokus Keyword', post.post_title AS 'Title', Concat(@domain, post.post_name) as "URL"
FROM wp_postmeta AS meta, wp_posts as post
WHERE meta.meta_key = '_yoast_wpseo_focuskw'
AND post.ID = meta.post_id
AND post.post_status = 'publish'
ORDER BY post.post_date ASC
View keybase.md

Keybase proof

I hereby claim:

  • I am sethiele on github.
  • I am sethiele (https://keybase.io/sethiele) on keybase.
  • I have a public key whose fingerprint is A33E 5998 F8A9 FC2F 5505 297F F79B 86D7 9FC1 627E

To claim this, I am signing this object:

@sethiele
sethiele / gpg-ip-support.md
Last active Jun 19, 2016
Infopark Support GPG
View gpg-ip-support.md

#Mit GPG verschlüsselte Informationen an den Infopark Support senden

Wenn Ihr wichtige Dinge an den Support senden wollt, dann verschlüsselt diese bitte per GPG.

Am einfachsten geht ihr dafür folgendermaßen vor:

  1. Ladet euch die GPG-Keys der Supporter herunter:
    0x6339A4E9 Anne Schulz
    0x6C92D54D Bartek Ochab
    0x0262A434 Dirk Nitschle
View legacy_url_proxy.rb
# encoding: utf-8
class LegacyUrlProxy
URL_MAPPING = {
'//surgeons-for-africa.com' => '//surgeons-for-africa.org',
}
def initialize(app)
@app = app
end
@sethiele
sethiele / gist:730794
Created Dec 6, 2010
Wordpress get_posts
View gist:730794
<?php global $post; $myposts = get_posts('numberposts=10&offset=0'); //Mit dieser Funktion läd man "numberposts"
foreach($myposts as $post) :
setup_postdata($post);
print get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
endforeach; ?>
You can’t perform that action at this time.