Skip to content

Instantly share code, notes, and snippets.

View sirkosi's full-sized avatar
🎯
Focusing

Sirko sirkosi

🎯
Focusing
View GitHub Profile
@sirkosi
sirkosi / git_cleanup.md
Last active March 19, 2020 14:37
Git Branch cleanup for branches without remotes
git remote prune origin

git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
@sirkosi
sirkosi / docker.md
Last active August 8, 2019 03:10
Docker Commands
@sirkosi
sirkosi / index.html
Created June 13, 2019 17:04
OpenGraph Test
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Quickshift</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://www.qshift.eu/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://www.qshift.eu/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://www.qshift.eu/apple-icon-72x72.png">
@sirkosi
sirkosi / app.rb
Last active February 22, 2019 02:00
Arduino WebClient Button
require 'sinatra'
set :bind, '0.0.0.0'
get '/foo' do
'Hello ' + params[:time]
end
@sirkosi
sirkosi / postgres_queries_and_commands.sql
Created October 12, 2017 15:42 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@sirkosi
sirkosi / gist:527e743ac9f8cecf858c165c0795f972
Created April 1, 2016 20:03 — forked from jordelver/gist:3139365
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@sirkosi
sirkosi / git.bash
Last active January 4, 2016 14:31
git remove history examples
$ git add PIA20086.tif
schmierkov@ ~/repos/sensitive-data (master)* 10:25:52 $ git commit -am 'added big file'
[master ec737d5] added big file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 PIA20086.tif
schmierkov@ ~/repos/sensitive-data (master) 10:26:09 $ git push
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 8.71 MiB | 161.00 KiB/s, done.
git branch Autocomplete for mac
http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/
@sirkosi
sirkosi / prepare.sh
Last active December 22, 2015 18:34
preparations
# JAVA
sudo yum install java-1.7.0-openjdk-devel
# ElasticSearch
# http://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-elasticsearch-logstash-and-kibana-4-on-centos-7-rhel-7.html
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.noarch.rpm
sudo rpm -Uvh elasticsearch-1.5.0.noarch.rpm
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
@sirkosi
sirkosi / vlc_problems.md
Created November 7, 2015 18:19
VLC Problems

VLC Problems

VLC Codec Error

No suitable decoder module:
VLC does not support the audio or video format "hev1". Unfortunately there is no way for you to fix this.

VLC Debugging