ufw allow ssh
ufw allow 2222
#!/bin/bash | |
echo "\"Branch Name\",\"Last Commit Date\",\"Last Commit Date (ago)\",\"Last Commit By\"" | |
for branch in `git branch -r --merged master | grep -v HEAD` | |
do | |
git show --format="\"$branch\",\"%ci\",\"%cr\",\"%an\"" $branch | head -n 1 | |
done |
{ | |
"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/", |
// 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); |
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) |
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) |
'use strict'; | |
// Tested with Angular 1.3, 1.4.8 | |
angular.module('scrollToEnd', []) | |
/** | |
* @ngdoc directive | |
* @name scrollToEnd:scrollToEnd | |
* @scope | |
* @restrict A | |
* | |
* @description |
" Vim syntax file | |
" Language: CSC488 Project Language | |
" Maintainer: Petro Podrezo | |
" Latest Revision: 18 January 2012 | |
if exists("b:current_syntax") | |
finish | |
endif | |
" ################### Define Keywords #################### |
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
} | |
private void Window_Loaded(object sender, RoutedEventArgs e) | |
{ | |
// Initialize Internet Explorer |
'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)); | |
}); | |
} |