Skip to content

Instantly share code, notes, and snippets.

View AntonKL's full-sized avatar
😀

Anton Kjörck Lindén AntonKL

😀
View GitHub Profile
@AntonKL
AntonKL / README.md
Last active December 11, 2015 05:58 — forked from aronwoost/README.md
<!-- begin olark code -->
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
f[z]=function(){
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
0:+new Date};a.P=function(u){
a.p[u]=new Date-a.p[0]};function s(){
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
@AntonKL
AntonKL / gist:8932054
Created February 11, 2014 09:55
Laddar med AJAX. Ska läggas i toppen direkt efter start av <body> för att kunna mäta alla element. Inkluderar Analytics så den koden ska inte behövas också.
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-KS4XSZ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KS4XSZ');</script>
<!-- End Google Tag Manager -->
@AntonKL
AntonKL / gist:300c87f40332a229cb07
Last active August 29, 2015 14:02
Psudocode for susy
$small: (
columns: 4,
);
$medium: (
columns: 24,
);
$large: (
columns: 24,
@AntonKL
AntonKL / gist:b1420565ac8e0678c9ad
Created July 11, 2014 08:52
Cable analysscript
<!-- Start Website convention analytics -->
<script type='text/javascript'>
var _vwo_code=(function(){
var account_id=79156,
settings_tolerance=2000,
library_tolerance=2500,
use_existing_jquery=false,
// DO NOT EDIT BELOW THIS LINE
f=false,d=document;return{use_existing_jquery:function(){return use_existing_jquery;},library_tolerance:function(){return library_tolerance;},finish:function(){if(!f){f=true;var a=d.getElementById('_vis_opt_path_hides');if(a)a.parentNode.removeChild(a);}},finished:function(){return f;},load:function(a){var b=d.createElement('script');b.src=a;b.type='text/javascript';b.innerText;b.onerror=function(){_vwo_code.finish();};d.getElementsByTagName('head')[0].appendChild(b);},init:function(){settings_timer=setTimeout('_vwo_code.finish()',settings_tolerance);this.load('//dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(d.URL)+'&r='+Math.random());var a=d.createElement('style'),b='body{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !impor
<!-- Novium mätkod -->
<script type='text/javascript'>
var _vwo_code=(function(){
var account_id=79156,
settings_tolerance=2000,
library_tolerance=2500,
use_existing_jquery=false,
// DO NOT EDIT BELOW THIS LINE
f=false,d=document;return{use_existing_jquery:function(){return use_existing_jquery;},library_tolerance:function(){return library_tolerance;},finish:function(){if(!f){f=true;var a=d.getElementById('_vis_opt_path_hides');if(a)a.parentNode.removeChild(a);}},finished:function(){return f;},load:function(a){var b=d.createElement('script');b.src=a;b.type='text/javascript';b.innerText;b.onerror=function(){_vwo_code.finish();};d.getElementsByTagName('head')[0].appendChild(b);},init:function(){settings_timer=setTimeout('_vwo_code.finish()',settings_tolerance);this.load('//dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(d.URL)+'&r='+Math.random());var a=d.createElement('style'),b='body{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}',h=d.getElemen
@AntonKL
AntonKL / gist:077aff768eea49f6a048
Created September 5, 2014 11:01
Settings sublime
[
{ "keys": ["ctrl+§"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["super+§"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["§"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
{ "keys": ["alt+super+right"], "command": "indent" },
{ "keys": ["alt+super+left"], "command": "unindent" },
{ "keys": ["super+p"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }
]
Process: pupil_capture [5391]
Path: /Applications/Pupil Capture.app/Contents/MacOS/pupil_capture
Identifier: pupil_capture
Version: v0.3.9 (???)
Code Type: X86-64 (Native)
Parent Process: pupil_capture [5389]
Responsible: pupil_capture [5389]
User ID: 501
Date/Time: 2014-10-09 18:59:37.357 +0200
@AntonKL
AntonKL / gist:e4f787d30cae9e686b31
Created October 15, 2014 15:33
Modal dem0 (without js)
<style>
.campaign-modal {
display: none;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,.35);
z-index: 9998;
<p>Antal kvadrat: </p> <input name="Antal kvadrat" id="squaremeeters" type="text" /> <br />
Summa:<p id="sum"></p>
Summa: (RUT) <p id="sumrut"></p>
$('#squaremeeters').keyup(calculate);
function calculate(e) {
var maths = $('#squaremeeters').val() * 50 ;
$('p#sum').text(maths);