Skip to content

Instantly share code, notes, and snippets.

View MilosSimic's full-sized avatar

Milos MilosSimic

  • Faculty of technical sciences Novi Sad
  • Novi Sad
View GitHub Profile
@lopspower
lopspower / README.md
Last active May 7, 2024 23:40
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@soheilhy
soheilhy / nginxproxy.md
Last active May 7, 2024 14:55
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 16:42
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@grakic
grakic / ePorezi-macOS.md
Last active April 2, 2024 13:27
ePorezi na macOS

ePorezi na macOS

Zvanična klijentska aplikacija Poreske uprave se može preuzeti sa njihove stranice.

U pitanju je Java aplikacija koja dolazi sa posebno priređenom distribucijom Oracle Java radnog okruženja. Aplikacija podržava samo Microsoft Windows operativni sistem i sertifikatima u Personals skladištu pristupa kroz Microsoft CryptoAPI koji poziva operacije na pametnoj kartici ili tokenu posredstvom midlvera.

Sertifikaciono telo Pošte korisnicima nudi SafeSign midlver, osim u verziji za Windows i u verziji za GNU/Linux i macOS operativne sisteme. Midlver isporučuje prateću aplikaciju za upravljanje karticom/tokenom i PKCS#11 biblioteku. Programi poput jSignPDF, Adobe Reader ili LibreOffice mogu da učitaju ovu biblioteku i omoguće korisniku elektronsko potpisivanje dokumenata.

Elektronsko potpisivanje se koristi i na portalu ePorezi Poreske uprave, posredstvom pomenute klijentske aplikacije.

cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
@myinnos
myinnos / TouchImageView.java
Last active March 22, 2024 12:14
Android ImageView to include pinch zooming, panning, fling and double tap zoom.
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.net.Uri;

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l