if [ ! -n "$TMUX" ];
then
export TERM=gnome-256color
( (tmux -2 has-session -t alex && tmux -2 attach-session -t alex) || (tmux -2 new-session -s alex) )
echo "tmux failed to start" 1>&2
fi
This file contains hidden or 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
package main | |
import ( | |
"sync" | |
) | |
func Pic(dx, dy int) [][]uint8 { | |
pic := make([][]uint8, dy) | |
n := 1 |
This file contains hidden or 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
<ng-container [ngSwitch]="condition"> | |
<component-A *ngSwitch="condition"></component-A> | |
<component-B *ngSwitch="condition"></component-B> | |
</ng-container> | |
@Component( | |
providers: [ | |
{ provide: ABC, useClass: ConcreteAClass } | |
] | |
) |
This file contains hidden or 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 fixCategories() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
var newData = new Array(); | |
var map = { | |
'Subscriptions': ['netflix', 'google music'], |
This file contains hidden or 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 fixCategories() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
var newData = new Array(); | |
var map = { | |
'Subscriptions': ['netflix', 'google music'], |
This file contains hidden or 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
#! /bin/bash | |
INKSCAPE="/usr/bin/inkscape" | |
OPTIPNG="/usr/bin/optipng" | |
SRC_FILE="assets.svg" | |
DARK_SRC_FILE="assets-dark.svg" | |
ASSETS_DIR="assets" | |
DARK_ASSETS_DIR="assets-dark" |
This file contains hidden or 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
#!/usr/bin/ruby | |
def change(x) | |
solutions = Array.new(x,0) | |
solutions[0] = 0; | |
(0..x).each do |ii| | |
if 1 <= ii && ii < 10 | |
solutions[ii] = 1 + solutions[ii-1] | |
elsif 10 <= ii && ii < 25 | |
solutions[ii] = 1 + [solutions[ii-1], solutions[ii-10]].min |