- Make sure you are sharing at least free/busy details about your calendar to the public
- Add freebusy.js and jQuery (with ajax support, not jQuery slim) to your project
- Make an API Key at the Google Developers Console and enable Google Calendar support
- Change the API key at line 5
- Change the Google Calendar address from
googlecalendarid@gmail.com
to the one that you want to check on line 6 - ???
- Profit
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
'use strict'; | |
angular.module('wordpress', []) | |
.service( 'wpService', | |
function($http, $q){ | |
var url = 'http://allin.local/wp-json/'; | |
return({ |
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
app.run([ | |
function() { | |
/** | |
* Cause a full page load on every route change. | |
*/ | |
$rootScope.$on('$locationChangeStart', function($event, changeTo, changeFrom) { | |
if (changeTo == changeFrom) { | |
return; | |
} |
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 (ko, handlers, unwrap, extend) { | |
"use strict"; | |
extend(handlers, { | |
href: { | |
update: function (element, valueAccessor) { | |
handlers.attr.update(element, function () { | |
return { href: valueAccessor() }; | |
}); | |
} | |
}, |
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
// JSBin: http://jsbin.com/kekoli/edit?js,console | |
import {observable, observe} from "mobx"; | |
const person = observable({ | |
firstName: "Maarten", | |
lastName: "Luther" | |
}); | |
const disposer = observe(person, (change) => { | |
console.log(`${change.type} '${change.name}' from '${change.oldValue}' to '${change.object[change.name]}'`); |
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(){ | |
let gamepad = null; | |
let loopInterval = null; | |
window.addEventListener("gamepadconnected", connectHandler); | |
window.addEventListener("gamepaddisconnected", disconnectHandler); | |
function connectHandler(e) { | |
if (!gamepad) { |
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
<!DOCTYPE html> | |
<html ng-app="App"> | |
<head> | |
<meta name="description" content="AngularJS + jQuery UI Drag-n-Drop" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js"></script> | |
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> | |
<meta charset=utf-8 /> |
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
Something like this: | |
+----------+ +-----------+ | |
| |+----SSH+-->| | | |
| A | | B | | |
|+--------+| | | | |
Internet <-++-+PROXY<++<SSH Tunnel--+ | | |
|+--------+| | | | |
+----------+ +-----------+ |
This excercise computes PageRank of npm dependencies graph.
- Download all npm modules:
wget https://skimdb.npmjs.com/registry/_design/scratch/_view/byField
- Convert them into ngraph.graph using convertToGraph.js script.
- Run
rank.js
(see below):
Number of nodes: 123,969; Number of edges: 281,471; PageRank computed in 1,187 ms;
- underscore - 0.0132458168541106
- lodash - 0.012808245947189859
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
Failed attempts by username: | |
grep "Invalid user " /var/log/auth.log | cut -d' ' -f8 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100 | |
IP address of each attempt: | |
grep "Invalid user " /var/log/auth.log | cut -d' ' -f10 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100 | |
Filter for brute-force interactive SSH logins: | |
grep sshd.\*Failed /var/log/auth.log | less | |
Look for failed connections (i.e. no login attempted, could be a port scanner, etc.): |
OlderNewer