Skip to content

Instantly share code, notes, and snippets.

Avatar

Emil Stahl emilstahl

View GitHub Profile
@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
@emilstahl
emilstahl / monit.sh
Created Aug 29, 2016
Monitor traceroute
View monit.sh
[ $(mtr -rwc 1 vpn-byen.dk | grep -oh Level3) == "Level3" ] || curl -X POST https://maker.ifttt.com/trigger/level3/with/key/xxx
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 / unoeuro-batch-delete-products.js
Created Jan 27, 2014
Batch delete UnoEuro products the easy way!
View unoeuro-batch-delete-products.js
$('input[value=notusing]').attr('checked', true);
$('input[name=confirm]').attr('checked', true);
$('input[name=confirm2]').attr('checked', true);
document.forms['form1']['confirmtext'].value += 'SLET DOMAIN.TLD';
document.forms["form1"].submit();