ufw allow ssh
ufw allow 2222
'use strict'; | |
/* Inspired by this DailyWTF http://thedailywtf.com/articles/genderize | |
* I have used the same algorithm to genderize the 100 most popular boys names | |
* and 100 most popular girls names in 2014, then spew out the results table | |
* as well as the final number of correct guesses for each. Enjoy! */ | |
var boysNames = ['Jackson', | |
'Aiden', | |
'Liam', | |
'Lucas', |
'use strict'; | |
var exec = require('child_process').exec; | |
module.exports = function(callback) { | |
exec('"C:\\Program Files (x86)\\ZBar\\bin\\zbarimg.exe" --raw --quiet capture.png', function(err, stdout, stderr){ | |
if(err) { return callback(err); } | |
return callback(null, stdout.substring(0,stdout.length-1)); | |
}); | |
} |
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
} | |
private void Window_Loaded(object sender, RoutedEventArgs e) | |
{ | |
// Initialize Internet Explorer |
" Vim syntax file | |
" Language: CSC488 Project Language | |
" Maintainer: Petro Podrezo | |
" Latest Revision: 18 January 2012 | |
if exists("b:current_syntax") | |
finish | |
endif | |
" ################### Define Keywords #################### |
'use strict'; | |
// Tested with Angular 1.3, 1.4.8 | |
angular.module('scrollToEnd', []) | |
/** | |
* @ngdoc directive | |
* @name scrollToEnd:scrollToEnd | |
* @scope | |
* @restrict A | |
* | |
* @description |
require 'minitest/autorun' | |
# Good blog article https://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods | |
# Extends 'Array' adding the pmap method which is equivalent to map | |
class Array | |
# def pmap(&block) | |
# map(&block) | |
# end | |
def pmap(&block) |
class MyClass | |
attr_writer :my_value | |
end | |
def my_function(i) | |
return if i.zero? | |
my_stack_var = MyClass.new | |
# "Each slot is big enough to hold one Ruby object" | |
puts "heap_free_slot -> #{GC.stat[:heap_free_slot]}, stack_size -> #{caller.size}" | |
my_function(i-1) |
// https://en.wikipedia.org/wiki/Interval_tree | |
export default class IntervalTree { | |
// intervals is a two dimensional array of "from" and "to" values | |
// the values can be of any type. If they can directly be compared | |
// using greater/lesser than operators then a compare function does | |
// not need to be supplied | |
constructor(intervals) { | |
this.allIntervals = intervals.map(interval => new Interval(interval[0], interval[1])); | |
this.root = new IntervalTreeNode(this.allIntervals); |
{ | |
"timeZone": "America/Toronto", | |
"dependencies": {}, | |
"dataStudio": { | |
"name": "Toronto City Council Attendance", | |
"logoUrl": "https://i.imgur.com/e9wE7Md.png", | |
"company": "Petro Podrezo", | |
"companyUrl": "https://toronto.ca/", | |
"addonUrl": "https://toronto.ca/", | |
"supportUrl": "https://toronto.ca/", |