Skip to content

Instantly share code, notes, and snippets.

View stanbar's full-sized avatar
👨‍🎓
Researching blockchain-based voting

Stanislaw Baranski stanbar

👨‍🎓
Researching blockchain-based voting
View GitHub Profile
@vladignatyev
vladignatyev / progress.py
Last active March 31, 2024 22:54
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
@bcremer
bcremer / gist:12167985b442d0d195de
Created August 5, 2014 12:01
NGINX as caching REST-API Proxy
upstream backend {
server localhost:8080;
#server backup1.example.com:8080 backup;
#server backup2.example.com:8080 backup;
}
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:10m;
# Set cache key to include identifying components
@felHR85
felHR85 / SoftKeyboard.java
Last active February 17, 2024 23:11
A solution to catch show/hide soft keyboard events in Android http://felhr85.net/2014/05/04/catch-soft-keyboard-showhidden-events-in-android/
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@kevinwright
kevinwright / arch-firstboot.md
Last active October 25, 2023 08:28
Arch first-boot configuration. Setup the first user, sudo, vm tools, and enough of a dev env to support AUR+yaourt

OpenSSH daemon

pacman -S openssh
systemctl start sshd
systemctl enable sshd.socket

Sudoers