Skip to content

Instantly share code, notes, and snippets.

View NejcZupec's full-sized avatar

Nejc Župec NejcZupec

  • Ljubljana, Slovenia
View GitHub Profile
@sixty4k
sixty4k / delete_iam_user.sh
Created May 30, 2017 18:31
Delete IAM user
#!/bin/bash
user_name=$1
echo ${user_name}
echo "Deleting Access Key"
aws iam delete-access-key --access-key-id $(aws iam list-access-keys --user-name ${user_name} \
| jq -r '.AccessKeyMetadata[] | .AccessKeyId' ) --user-name ${user_name}
@kdzwinel
kdzwinel / trilateration.js
Created January 3, 2014 09:35
Simple trilateration algorithm implementation in JavaScript.
function getTrilateration(position1, position2, position3) {
var xa = position1.x;
var ya = position1.y;
var xb = position2.x;
var yb = position2.y;
var xc = position3.x;
var yc = position3.y;
var ra = position1.distance;
var rb = position2.distance;
var rc = position3.distance;
import sys
import urllib
import re
import random
from lxml import etree
class Downloader():
'''
Class to retreive HTML code
and binary files from a
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@asmallteapot
asmallteapot / nginx.conf
Created March 14, 2012 19:00
My default Nginx configuration for serving Django projects.
# file: /etc/nginx/sites-available/example.com
# nginx configuration for example.com
server {
listen 80;
server_name example.com;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
# pass root to django
@mnazim
mnazim / active_tag.py
Created July 9, 2011 14:59
(Django) A simple template tag to add an 'active' class to anchor tags
from django import template
from django.core.urlresolvers import reverse
register = template.Library()
@register.simple_tag
def add_active(request, name, by_path=False):
""" Return the string 'active' current request.path is same as name
Keyword aruguments: