Skip to content

Instantly share code, notes, and snippets.

angular.module('Facebook', [])
.factory('Facebook', function($rootScope, $q){
var facebook = {};
/**
* @name facebook.getPermission
* @requires $q
*
* @description
* Try to receive permissions from Facebook.
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
upstream atric-node {
server 127.0.0.1:3000;
keepalive 64;
}
server {
listen 80;
server_name atric.flabs.org;
root /home/app/atric/public;
@killercup
killercup / Gruntfile.coffee
Last active December 22, 2015 03:29
Gruntfile with build config for CDN/bower assets
module.exports = (grunt) ->
# ...
userConfig = require "#{__dirname}/client/build.config"
grunt.initConfig
# ...
copy:
vendor:
// ====== CSS ARROW PLEASE =====
// technique from http://cssarrowplease.com/
@mixin arrow-top($size, $color, $border-width, $border-color, $left: 50%) {
& {
background: $color;
border: 1px solid $border-color;
}
&:after, &:before {
bottom: 100%;
#! /bin/csh
echo "Got your commits, begin precompiling assets..."
#echo '---' >> /home/app/hooks.log
setenv GIT_DIR /home/app/atric/.git
cd /home/app/atric/
git pull > /dev/null
git log --pretty=format:'%h%d %s\n' --abbrev-commit --date=relative -n 1
npm install > /dev/null && echo 'npm done.'
cd client
bower install > /dev/null && echo 'bower done.'
/*
* SVG Background with Fallback
*
* Usage:
.logo {
margin: 12px auto 0;
$w: 150px;
$h: 75px;
width: $w;

Android Holo Input Field Using CSS3 Backgrounds

I was looking for a solution to style an input field to look like the Holo Light theme of Android 4.x, but every solution needed additional markup.

That wasn't good enough for me, so I thought about this for a minute and had an idea: Multiple background images, positioned along the bottom of the input field, sized correctly using background-size. By using linear-gradient instead of images, it is quite easy to change colors.

Tested on Chrome 32 and Android 4.3. Use at your own risk.

A Pen by Pascal on CodePen.

@killercup
killercup / Readme.md
Last active December 28, 2015 18:59
https://github.com/killercup/angular-epicmodel <-- Moved to full repo! Angular Model Collection Service.

Collatz conjecture implemented in some languages

Implementation Time
clang 3.3 0.40s
luajit 2.0.2 0.86s
GHC 7.6.3 0.49s
Node 0.10.22 2.43s

C