This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="description" content="Checking online status in AngularJS app" /> | |
<title>ng-online</title> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.14/angular.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script> | |
<script src="main.js"></script> | |
<body ng-app="App"> | |
<div ng-controller="AppController"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function callback () { | |
console.count("Throttled"); | |
} | |
window.addEventListener("resize", throttle( callback, 300 )); | |
function throttle (callback, limit) { | |
var wait = false; // Initially, we're not waiting | |
return function () { // We return a throttled function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; credit SanityInc : http://stackoverflow.com/a/6415812 | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (replace-regexp-in-string | |
"[ \t\n]*$" | |
"" | |
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'")))) | |
(setenv "PATH" path-from-shell) | |
(setq eshell-path-env path-from-shell) ; for eshell users | |
(setq exec-path (split-string path-from-shell path-separator)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.run(function($rootScope, $location, SlidebeanUser) { | |
// 1) AngularJS app is now running | |
// 2) Initialize Parse and set the current user to the $rootScope | |
Parse.initialize("parse app", "parse credentials"); | |
$rootScope.sessionUser = SlidebeanUser.current(); | |
// 3) Finally, init Facebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defhydra hydra-buffers (:color blue :hint nil) | |
" | |
╭─────────┐ | |
Move to Window Switch Do │ Buffers │ | |
╭────────────────────────────────────────────────────────────────────┴─────────╯ | |
^_k_^ [_b_] switch (ido) [_d_] kill the buffer | |
^^↑^^ [_i_] ibuffer [_r_] toggle read-only mode | |
_h_ ← → _l_ [_a_] alternate [_u_] revert buffer changes | |
^^↓^^ [_s_] switch (helm) [_w_] save buffer | |
^_j_^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="description" content="Checking online status in AngularJS app" /> | |
<title>ng-online</title> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.14/angular.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script> | |
<script src="main.js"></script> | |
<body ng-app="App"> | |
<div ng-controller="AppController"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Cano = (function() { | |
var thisURL = window.location.protocol + "//" + window.location.host + window.location.pathname; | |
var pathArray = window.location.pathname.split('/'); | |
var pathLength = pathArray.length; | |
function Cano(n) { | |
if (pathLength > 3){ | |
$('head').append('<link rel="canonical" href="'+"http:\/\/designskins.com\/de\/design-folien\/handy-huelle"+'"/>'); | |
} else{ | |
$('head').append('<link rel="canonical" href="'+thisURL+'"/>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; marker-visit.el --- navigate through a buffer's marks in order | |
;; Copyright (C) 2001 Benjamin Rutt | |
;; | |
;; Maintainer: Benjamin Rutt <brutt@bloomington.in.us> | |
;; Version: 1.1 | |
;; This file is not part of GNU Emacs. | |
;; This file is free software; you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; | |
;;; Emacs init file by | |
;;; Robert Adesam, robert@adesam.se | |
;;; http://www.adesam.se/robert/ | |
;;; | |
;;; This is my init file for Emacs 22, 23, and 24 on MacOSX, Linux, | |
;;; and Windows/Cygwin | |
;;; | |
;;; TODO: Solaris |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx React.DOM */ | |
var Email = Backbone.Model.extend({ | |
defaults: { | |
email: "" | |
}, | |
validate: function (attrs) { | |
if (!/^.+@.+\..+$/.test(attrs.email)) { | |
return "'" + attrs.email + "' is not a valid email."; | |
} |