Skip to content

Instantly share code, notes, and snippets.

View uroshekic's full-sized avatar

Uroš Hekić uroshekic

View GitHub Profile
@uroshekic
uroshekic / properties.kts
Last active August 25, 2019 19:57
This script transforms Spring's .properties file into different formats: Docker Compose environment variables/env-file or Asciidoctor Table
import java.io.File
if (args.size < 2) {
println("This script transforms a .properties file in different formats.")
println("Please provide arguments: <file> <mode>")
println("Modes:")
println(" - environment: Print out properties in a Docker Compose environment attribute format")
println(" - env-file: Print out properties in a Docker Compose environment file attribute format")
println(" - configmap: Print out properties in a Kubernetes Configmap (YAML) format")
println(" - adoc-table: Print out an ASCII Doctor table")
@uroshekic
uroshekic / sublime.txt
Created May 13, 2019 19:48
Run Sublime from Terminal
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
open ~/.bash_profile
sublime .
@uroshekic
uroshekic / gist:a7b2c9b2b5feccdccea2547b2e7c2c59
Last active September 7, 2017 11:41
Choco Fresh install
# Choco
# https://www.howtogeek.com/224342/how-to-clean-install-windows-10/
# https://www.howtogeek.com/216751/bloatware-banished-windows-10-eliminates-the-need-to-ever-reinstall-windows-on-new-pcs/
# Useful scripts:
# https://github.com/CADbloke/BoxStarter/blob/master/CADbloke-Boxstarter-Dev.ps1
# https://github.com/CADbloke/BoxStarter/blob/master/CADbloke-Boxstarter.ps1
## Install
@uroshekic
uroshekic / gist:d428a9ef09e28e4855a9
Created November 10, 2014 12:35
Installing Guest Additions to Linux host (Virtualbox)
# https://www.virtualbox.org/manual/ch04.html#idp54739648
# http://www.turnkeylinux.org/docs/virtualbox-guest-addons
apt-get install dkms
# Insert Guest Additions CD image...
sudo mount /dev/cdrom /mnt
cd /mnt
sudo ./VBoxLinuxAdditions.run
# Restart
xrandr
@uroshekic
uroshekic / nginx-proxy
Created August 20, 2014 12:57
Nginx proxy
server {
listen 8080;
server_name proxy;
location / {
resolver 8.8.8.8;
proxy_set_header Accept-Encoding "";
proxy_pass http://xkcd.com$uri$is_args$args;
}
}
@uroshekic
uroshekic / win8-issues.md
Last active August 29, 2015 14:02
Windows 8 issues

Blurry image (in Chrome, IDLE, ...)
http://support.microsoft.com/kb/2900023
Lower the overall Windows DPI setting. To do this, open the Display item in Control Panel (or search for "dpiscaling" from the Start screen), and then adjust the slider under Change the size of all items. You may have to click to select the check box for Let me choose one scaling level for all my displays and then change the scale to 100 percent.

Wifi not working properly
Install Intel® Centrino® Wireless-N 2230 Drivers from Intel's website!

The solution is to Change your DNS to the Google Public Setting...I have done this and haven't had a problem since.  I have even confirmed this fix with my ISP and they seemed surprised that I didn't know about it.
Step 1 Control Panel---Network and Sharing Center---Change adapter settings
@uroshekic
uroshekic / setup.sh
Last active August 29, 2015 14:02
Migrating to Linux Mint 17
#### InstallEssentials Script ####
# args: Options that will be appended to every apt-get install command.
# Possible options: -y --force-yes -q -qq ...
#args="-y -qq"
args="-y"
# argsAddRepo: Options that will be appended to every add-apt-repository command.
# Possible options: -y (force yes on all confirmation questions!)
argsAddRepo="-y"
@uroshekic
uroshekic / laravel4-openshift-build
Created May 22, 2014 20:49
Deploying Laravel 4 to Openshift
#!/bin/bash
# http://openshift.github.io/documentation/oo_user_guide.html#the-openshift-directory
# Note: On Windows, the execute permissions of an action hook files will be lost during the git push.
# To fix this problem, you can run this command:
# git update-index --chmod=+x .openshift/action_hooks/*
cd $OPENSHIFT_DATA_DIR
if [ ! -d "repo" ]; then
echo 'Cloning repository...'
git clone -b dev https://github.com/dcrystalj/RubiKS.git repo
@uroshekic
uroshekic / my.sublime-keymap
Created April 23, 2014 07:35
Sublime Keymap
[
{ "keys": ["ctrl+shift+o"], "command": "prompt_open_folder" },
{ "keys": ["ctrl+pagedown"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+pageup"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
@uroshekic
uroshekic / tkinter-autocomplete-listbox.py
Last active March 22, 2023 07:18
Tkinter - Autocomplete Entry Field
"""
Inspired by http://code.activestate.com/recipes/578253-an-entry-with-autocompletion-for-the-tkinter-gui/
Changes:
- Fixed AttributeError: 'AutocompleteEntry' object has no attribute 'listbox'
- Fixed scrolling listbox
- Case-insensitive search
- Added focus to entry field
- Custom listbox length, listbox width matches entry field width
- Custom matches function
"""