Skip to content

Instantly share code, notes, and snippets.

Avatar
🤷‍♂️
¯\_(ツ)_/¯

Nikola Plejic nikolaplejic

🤷‍♂️
¯\_(ツ)_/¯
View GitHub Profile
@nikolaplejic
nikolaplejic / iit.py
Last active Aug 29, 2015
Interface Inventory Thingy
View iit.py
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 Aug 29, 2015
Lambda Zagreb - Clojure code snippets
View core.clj
(ns lambdazg.core
(:require [clojure.core.async :as async :refer [>! <! >!! <!! go chan buffer close! thread
alts! alts!! timeout]])
(:gen-class))
;; --
View gist:9875246
### 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 Dec 24, 2015
Client-side GitHub repo search module.
View github.html
<!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 Sep 6, 2012
How to copy/paste your password in PayPal's change password form
View gist:3654637
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 Mar 6, 2012
Make The Facebook Ticker Bigger (& Kill Chat) Greasemonkey Script
View fbchatkiller.js
// ==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 Aug 26, 2011
Quick & dirty operating system statistics for usesthis.com
View usesthis_os_stats.js
/*
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 Sep 2, 2010
File upload example in Compojure
View core.clj
(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]))