Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block 0xBADC0FFEE

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View async-js-files.js
(function() {
"use strict";
function loadJSAsync() {
var js = document.createElement("script");
js.type = "text/javascript";
js.src = "script.js";
js.async = true;
// insert the "js" script tag to the DOM here ...
if (window.attachEvent) {
View 01. vertical and horizontal centering
.Absolute-Center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
View meta viewport
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
View Focus after show.js
app = angular.module('App', []);
app.controller('MenuCtrl', function () {});
app.directive('focusIf', [function () {
return function focusIf(scope, element, attr) {
scope.$watch(attr.focusIf, function (newVal) {
if (newVal) {
scope.$evalAsync(function() {
View Store session between server restart
maxAge: new Date( + 3600000),
store: new MongoStore(
console.log(err || 'connect-mongodb setup ok');
0xBADC0FFEE / scp
Created Sep 3, 2013
Постоянно забываю как копировать по ssh
View scp
scp -r -C /local/path
# копировать с удаленного хоста к себе
# -r с вложенными директориями
# -С с компрессией
0xBADC0FFEE / Disable app switcher
Created Sep 3, 2013
Remove app from application switcher Mac OS X
View Disable app switcher
<!-- root dict node -->
<!-- <dict> -->
<!-- other code inside dict -->
<!-- </dict> -->
.then (response) ->
# do something
response # if you would not return anything, promise would be fulfilled with undefined
.then (response) ->
# do something
undefined # necessary to prevent non-empty function body
.then null, (err) ->
# handle error
You can’t perform that action at this time.