Skip to content

Instantly share code, notes, and snippets.

View emnh's full-sized avatar

Eivind Magnus Hvidevold emnh

View GitHub Profile
@emnh
emnh / delete.js
Created November 6, 2011 09:01
Delete FaceBook posts
// 1. Load Facebook on your activity log page.
// 2. Load jQuery (paste this in address bar):
javascript:void((function(){j=document.createElement("SCRIPT");j.src="http://code.jquery.com/jquery-latest.pack.js";document.getElementsByTagName("HEAD")[0].appendChild(j);})())
// 3. Copy and paste the following into Chrome js console
function simulate(element, eventName)
{
var options = extend(defaultOptions, arguments[2] || {});
var oEvent, eventType = null;
@emnh
emnh / WebForm1.aspx
Created November 23, 2011 10:02
ASP.Net WCF Ajax snippet
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestWebApp.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="/Scripts/script.js" type="text/javascript"></script>
</head>
<body>
@emnh
emnh / index.html
Last active December 15, 2015 06:09
<html>
<body>
<h1>heading</h1>
<img src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"></img>
<H2>test2</H2>
primal
<iframe src="http://spreadsheets.google.com/tq?tqx=out:html&tq=SELECT(*)&key=0Al1m9R0_rJavdERMZjR3UHRwaEFOOEpOTS02ZW8xQlE"></iframe>
</body>
</html>
alert("hello");
@emnh
emnh / planets.html
Last active December 19, 2015 22:39
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
</body>
.pic {
display-style: block;
}
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ClojureScript REPL" />
<script src="http://himera-emh.herokuapp.com/js/repl.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://blog.favrik.com/css/fruity.css" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ClojureScript REPL" />
<script src="http://himera-emh.herokuapp.com/js/repl.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://blog.favrik.com/css/fruity.css" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
code = "
1 + 2
"
options = {
comment: false
range: false
loc: false
tolerant: false
}
@emnh
emnh / mori.js
Created November 29, 2013 15:33
mori.js 0.2.4 from npm
(function(definition){if(typeof exports==="object"){module.exports=definition();}else if(typeof define==="function"&&define.amd){define(definition);}else{mori=definition();}})(function(){return function(){
function aa(){return function(a){return a}}function f(a){return function(){return this[a]}}function m(a){return function(){return a}}var n,ba=this;
function p(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}var ca="closure_uid_"+(1E9*Math.random()>>>0),da=0;function