Skip to content

Instantly share code, notes, and snippets.

Avatar

Emil Stahl emilstahl

View GitHub Profile
View gov_ministries.txt
bm.dk
kebmin.dk
evm.dk
fmn.dk
km.dk
mfvm.dk
uvm.dk
skm.dk
sim.dk
sum.dk
@emilstahl
emilstahl / jquery.js
Created Jun 4, 2016
Maikens tumblr jquery
View jquery.js
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,f
View test.js
console.log('Hello world!');
View gist:738faf39f8cfd54d7225
{
"from": 0,
"query": {
"filtered": {
"filter": {
"term": {
"_type": "virksomhed"
}
},
"query": {
View cvr.json
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 6,
"successful": 6,
"failed": 0
},
"hits": {
"total": 313,
View config.fish
function lc
echo "$argv" | tr '[:upper:]' '[:lower:]'
end
@emilstahl
emilstahl / udid.sh
Created Jan 17, 2016
Get iOS device UDID in terminal
View udid.sh
system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'
@emilstahl
emilstahl / mtr.sh
Last active Sep 11, 2016
Fix mtr: unable to get raw sockets.
View mtr.sh
sudo chmod 4755 /usr/local/sbin/mtr; sudo chown root:wheel /usr/local/sbin/mtr; sudo chmod u+s /usr/local/sbin/mtr
View bookmarklet.js
javascript:function image(){var metas=document.getElementsByTagName('meta');for(i=0;i<metas.length;i++){if(metas[i].getAttribute("property")=="og:image"){return metas[i].getAttribute("content")}}return""} window.open(image(),'_blank');