Skip to content

Instantly share code, notes, and snippets.

@michelalbers
michelalbers / README.markdown
Created July 8, 2012 14:31 — forked from rn0/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is an extension to Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@michelalbers
michelalbers / readme.md
Last active February 27, 2023 19:48
A nodeJS port for the undocumented snapchat HTTP API. So far only login is implemented (which gives you all followers and snaps). You can post to any endpoint of the snapchat API though but you have to handle the response yourself. Feel free to enhance, fix and use it as you like! This is an early development stage.

Undocumented Snapchat API ported in nodeJS

Important: This is an early development stage. So far only login is implemented. You can however post to any endpoints of the API but you have to deal with the response yourself

Usage

Login

Provide a username and a password. The response of snapchat will contain the friends, the besties, the snaps and some additional information.

helpers.login(USERNAME, PASSWORD, function(res) { someCallback(); }, function(err) { someError(); });
@michelalbers
michelalbers / multipleimages-via-fal.ts
Last active August 29, 2015 14:00
Render Multiple Images of a tt_content Element via FAL
tmp.main_content = CONTENT
tmp.main_content {
table = tt_content
select {
where = colPos = 0
orderBy = sorting
languageField = sys_language_uid
}
renderObj = COA
renderObj {
@michelalbers
michelalbers / .vimrc
Created August 11, 2014 13:10
My vimrc
" Pathogen
execute pathogen#infect()
" Basics
syntax on
filetype plugin indent on
set number
let mapleader = ","
set guifont=Menlo\ Regular:h13
// Generated by CoffeeScript 1.7.1
var Model, bcrypt, lodash, mongoose;
mongoose = require("mongoose");
bcrypt = require("bcrypt");
lodash = require("lodash");
Model = (function(mongo, crypt, _) {
// Generated by CoffeeScript 1.7.1
var AlbumModel, Model;
Model = require('./basemodel');
require('./user');
require('./photo');
require('./like');
@michelalbers
michelalbers / auth.js
Created October 5, 2014 21:21
KOA Downstream Upstream Example
app.use(function*() {
this.user = yield magicUserIncjection();
next();
this.newToken = magicNewTokenFunction();
});
@michelalbers
michelalbers / lib.menu.language.ts
Created January 21, 2015 19:14
Language Switcher in TYPO3 with tx_news support
lib.menuLanguage = COA
lib.menuLanguage {
10 = HMENU
10 {
special = language
special.value = 1,2
stdWrap.wrap = <ul class="language-select">|</ul>
1 = TMENU
1 {
# Normal link to language that exists:
" Pathogen
execute pathogen#infect()
" Basics
syntax on
filetype plugin indent on
set number
let mapleader = ","
set guifont=Menlo\ Regular:h13
@michelalbers
michelalbers / divide-spaced-values.css
Last active February 25, 2016 12:36
Divide spaced values in sass
.foo {
padding: 1px 1.5px;
}