Skip to content

Instantly share code, notes, and snippets.

View jooray's full-sized avatar

Juraj Bednar jooray

View GitHub Profile
@jooray
jooray / # systemd - 2019-12-25_23-29-48.txt
Created December 25, 2019 22:34
systemd on 4.18.0-80.11.2.el8_0.x86_64 - Homebrew build logs
Homebrew build logs for systemd on 4.18.0-80.11.2.el8_0.x86_64
Build date: 2019-12-25 23:29:48
@jooray
jooray / transcribe.sh
Last active July 25, 2019 17:55 — forked from mmmaly/transcribe.sh
Call Google speech recognize
#!/bin/bash
# How to set it up:
# Create a project in Google Cloud admin console
# Install google cloud sdk (you need gcloud and gsutil commands)
# Install ffmpeg and jq
# Run gcloud init, login, answer the questions
# Under the project you created, create a globally unique bucket
# here: https://console.cloud.google.com/storage/browser
# set the name of the globally unique bucket name prefixed by gs://
# here
@jooray
jooray / install-lnd
Last active February 4, 2022 18:13
Install LND neutrino mainnet
#!/bin/bash
# Check the most recent LND_TAG at
# https://github.com/lightningnetwork/lnd/releases
export LND_TAG=1e511be523eb8e97c4e2d9c89a7a263963a3929f
# install lnd
git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
cd $GOPATH/src/github.com/lightningnetwork/lnd
git checkout $LND_TAG
# enabling mainnet on neutrino is in main branch since 0.8x, only uncomment for tag <0.8
#git fetch https://github.com/halseth/lnd.git mainnet-neutrino && git cherry-pick dbd3ca7be48027d8eda557e3c22268497ecc6b25
@jooray
jooray / secure-wordpress.conf
Created January 23, 2019 10:07
Securing wordpress in nginx
location ~ ^/wp-admin/includes/ {
return 403;
}
location ~ ^/wp-includes/[^/]+\.php$ {
return 403;
}
location ~ ^/wp-includes/js/tinymce/langs/.+\.php {
return 403;
@jooray
jooray / export.xml
Created January 21, 2019 22:03
Export jekyll as RSS, remove newlines in the full text to allow importing in wordpress. Put into pages/export.xml and regenerate your jekyll site
---
layout: null
---
{%- capture newline %}
{% endcapture -%}
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
@jooray
jooray / vCard_photo_extractor.sh
Last active May 6, 2019 05:59
vCard photo extractor
#!/bin/bash
# originally from
# https://raw.githubusercontent.com/mattbrock/mattbrock/master/vCard_photo_extractor/vCard_photo_extractor.sh
# changes:
# - made to work with macOS's base64 (uses -D not -d)
# - does not convert to fixed resolution
# - uses identify to remove invalid images
# - handles special characters better
@jooray
jooray / .htaccess
Last active February 19, 2018 09:51 — forked from Zodiac1978/.htaccess
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
php_value session.cookie_httponly 1
php_value session.cookie_secure 1
</IfModule>
@jooray
jooray / keybase.md
Created August 14, 2014 12:37
keybase.md

Keybase proof

I hereby claim:

  • I am jooray on github.
  • I am jurajbednar (https://keybase.io/jurajbednar) on keybase.
  • I have a public key whose fingerprint is 3529 61E1 BF53 DA48 B2D1 8B77 4D35 0309 AEE2 FB70

To claim this, I am signing this object: