Skip to content

Instantly share code, notes, and snippets.

View nikolaplejic's full-sized avatar
🤷‍♂️
¯\_(ツ)_/¯

Nikola Plejic nikolaplejic

🤷‍♂️
¯\_(ツ)_/¯
View GitHub Profile
@nikolaplejic
nikolaplejic / iit.py
Last active August 29, 2015 14:22
Interface Inventory Thingy
import sys
import os
if len(sys.argv) < 2:
print "I can haz argument?"
exit()
extension_templates = {
"html": "<!-- %s -->\n\n%s",
"scss": "/* %s */\n\n%s",
@nikolaplejic
nikolaplejic / core.clj
Last active August 29, 2015 14:17
Lambda Zagreb - Clojure code snippets
(ns lambdazg.core
(:require [clojure.core.async :as async :refer [>! <! >!! <!! go chan buffer close! thread
alts! alts!! timeout]])
(:gen-class))
;; --
### Keybase proof
I hereby claim:
* I am nikolaplejic on github.
* I am nikola (https://keybase.io/nikola) on keybase.
* I have a public key whose fingerprint is 96BE 44F1 F72E E610 CBBA 603A BCC8 A566 A4A4 8093
To claim this, I am signing this object:
@nikolaplejic
nikolaplejic / github.html
Last active December 24, 2015 23:39
Client-side GitHub repo search module.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>zgPHP GitHub snippet test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="githubreposearch.js"></script>
</head>
<body>
@nikolaplejic
nikolaplejic / gist:3654637
Created September 6, 2012 10:36
How to copy/paste your password in PayPal's change password form
PayPal blocks copy/paste actions in their "change password" form,
citing some irrelevant security issues as the reason. That's a
load of crap, and they know it -- disabling copy/paste makes it a
lot harder to use a decent password generator and a lot easier to
screw up your pwd when retyping, especially if it's a long one
(as it should be!).
So, here's the quick'n'dirty way to use an externally generated
password in your PayPal account:
@nikolaplejic
nikolaplejic / fbchatkiller.js
Created March 6, 2012 14:51
Make The Facebook Ticker Bigger (& Kill Chat) Greasemonkey Script
// ==UserScript==
// @name Make The Facebook Ticker Bigger (& Kill Chat)
// @namespace http://nikola.plejic.com/
// @include https://www.facebook.com/*
// @include http://www.facebook.com/*
// @include https://facebook.com/*
// @include http://facebook.com/*
// ==/UserScript==
document.querySelector("#pagelet_ticker").style.height = "95%";
@nikolaplejic
nikolaplejic / usesthis_os_stats.js
Created August 26, 2011 09:40
Quick & dirty operating system statistics for usesthis.com
/*
step 1: open http://usesthis.com/interviews/
step 2: open firebug (or chrome inspector)
step 3: inject jquery (*)
step 4: run the script below
results (Aug 26th, 2011) -- total: 156 | windows: 34, linux: 13, mac: 130
(*)
var script=document.createElement('script');
@nikolaplejic
nikolaplejic / core.clj
Created September 2, 2010 17:54
File upload example in Compojure
(ns fileupload.core
(:use [net.cgrand.enlive-html
:only [deftemplate defsnippet content clone-for
nth-of-type first-child do-> set-attr sniptest at emit*]]
[compojure.core]
[ring.adapter.jetty])
(:require (compojure [route :as route])
(ring.util [response :as response])
(ring.middleware [multipart-params :as mp])
(clojure.contrib [duck-streams :as ds]))