Skip to content

Instantly share code, notes, and snippets.

View adriaandotcom's full-sized avatar
🕵️‍♂️
Developing the privacy-first Simple Analytics

Adriaan adriaandotcom

🕵️‍♂️
Developing the privacy-first Simple Analytics
View GitHub Profile
@adriaandotcom
adriaandotcom / ajaxify-html5.js
Created June 21, 2012 10:38 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
// Check to see if History.js is enabled for our Browser
{
"name": "social-shop",
"dependencies": {
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"qunit": "~1.12.0",
"ember-qunit": "~0.1.5",
"ember": "1.5.1",
"ember-data": "1.0.0-beta.8",
"ember-resolver": "~0.1.1",
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
// for some large projects, you may want to uncomment this (for now)
es3Safe: false,
{
"name": "social-shop",
"version": "0.0.0",
"private": true,
"directories": {
"doc": "doc",
"test": "test"
},
"scripts": {
"start": "ember server",
export default Ember.Controller.extend({
appName:'Testing CORS on IE',
init: function() {
$.get('https://api.socialshop-development.nl').done(function(data) {
console.log("got result: ", data);
});
}
});
@adriaandotcom
adriaandotcom / application.controller.js
Last active January 28, 2016 12:29
Ember: Set class on root div element
import Ember from 'ember';
export default Ember.Controller.extend({
// This is arrow function in > ES6
addClass: () => {
// Run next, otherwise the DOM is not ready
Ember.run.next(this, function() {
{
"current_city": "Amsterdam",
"you_can_add_more_fields_later": "if you like"
}

Keybase proof

I hereby claim:

  • I am harianus on github.
  • I am harianus (https://keybase.io/harianus) on keybase.
  • I have a public key ASCcznYg2mV6CndZAEuaxXoG9DhPNN1Z6hqXcEQ_imAf1wo

To claim this, I am signing this object:

@adriaandotcom
adriaandotcom / gist:b76c5d319bcb7d1dd530add901dd0d8a
Last active November 17, 2018 08:09
Placeholder for privacyfirstproduct.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
</html>
<body>
<p>
Hey guys, I'm live streaming while building my #24hrstartup on <a href="https://www.twitch.tv/adriaanvanrossum">twitch</a><br>
@adriaandotcom
adriaandotcom / comments.js
Created November 18, 2018 17:00
Write recusive function to read comments
const comments = [
{ id: 1, original_id: null, upvotes: 10, text: 'Hi..' },
{ id: 2, original_id: null, upvotes: 0, text: 'Je..' },
{ id: 3, original_id: 1, upvotes: 0, text: 'Di..' },
{ id: 4, original_id: 1, upvotes: 7, text: 'Si..' },
{ id: 5, original_id: 1, upvotes: 5, text: 'Op..' },
{ id: 6, original_id: null, upvotes: 2, text: 'Op..' },
{ id: 7, original_id: 6, upvotes: 2, text: 'Op..' },
{ id: 8, original_id: 5, upvotes: 3, text: 'Op..' },
{ id: 9, original_id: 1, upvotes: 3, text: 'Op..' }