Keybase proof
I hereby claim:
- I am nikolaik on github.
- I am nikolaik (https://keybase.io/nikolaik) on keybase.
- I have a public key ASC81RvUb8Mz8F7pr6Amv-ExoL3H6DRvNL1tB67mM06EHAo
To claim this, I am signing this object:
import argparse | |
import json | |
import os | |
import requests | |
ORG_SLUG = "..." | |
SLACK_WORKSPACE_ID = "..." | |
OWNER_TEAM = "..." | |
SLACK_RULES = { |
import requests | |
def call_api(text): | |
print('calling example.com') | |
return requests.post('http://example.com', data=text).text | |
def translate_bot(): | |
texts = ['jeg', 'vet', 'ikke', 'hvordan', 'dette', 'fungerer'] | |
return all(['Example' not in call_api(t) for t in texts]) |
function fetchFinnData(finn_url) { | |
/** fetchFinnData('https://www.finn.no/realestate/homes/ad.html?finnkode=116229744'); */ | |
if (!finn_url || finn_url.indexOf('?finnkode=') === -1) { | |
return; | |
} | |
var API_URL = 'https://<YOUR_HEROKU_APP>.herokuapp.com/' | |
var param = finn_url.match(/\?finnkode=.+/)[0] | |
var url = API_URL + param; | |
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); |
{ | |
"ad": { | |
"Boligtype": "Leilighet", | |
"Bruksareal": 37, | |
"Bruttoareal": 42, | |
"Byggeår": 1939, | |
"Eieform": "Andel", | |
"Energimerking": "D - gul", | |
"Etasje": "4.", | |
"Fellesformue": 46513, |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
# coding: utf-8 | |
import os | |
from subprocess import Popen, PIPE | |
import shutil | |
# SETTINGS | |
CERT_DIR = '/etc/nginx/ssl/' | |
WEBROOT = '/tmp/letsencrypt' |
#!/usr/bin/env python3 | |
""" | |
wp_upgrade.py upgrades wordpress installations recursively. | |
- looks for Wordpress installations | |
- tries to update WP core, plugins and themes | |
Requires: WP-CLI http://wp-cli.org/ | |
""" |
from django_auth_ldap.backend import LDAPBackend, _LDAPUser | |
class LDAPUsernameBackend(LDAPBackend): | |
settings_prefix = "AUTH_LDAP_U_" | |
class LDAPEmailBackend(LDAPBackend): | |
settings_prefix = "AUTH_LDAP_E_" |
#!/bin/bash | |
NODES=`sudo puppet cert list --all|awk '{print $2}'` # Get all node names | |
echo '{"facts": [' > facts_tmp.json | |
# for node in node: get facts | |
echo -n $NODES | xargs -d " " -i sh -c 'sudo puppet facts find {} --terminus rest | tr "\n" "," >> facts_tmp.json' | |
sed -ie 's/,$//' facts_tmp.json # Remove last comma | |
echo ']}' >> facts_tmp.json | |
# optionally format and filter json (requires jq) |
find . -name "*.jpg" -print0 | sed 's/\.jpg//g' | xargs -0 -I % cwebp -o %.webp -q 90 %.jpg |