Skip to content

Instantly share code, notes, and snippets.

View alexluecke's full-sized avatar

Alex Luecke alexluecke

View GitHub Profile
package main
import (
"sync"
)
func Pic(dx, dy int) [][]uint8 {
pic := make([][]uint8, dy)
n := 1
<ng-container [ngSwitch]="condition">
<component-A *ngSwitch="condition"></component-A>
<component-B *ngSwitch="condition"></component-B>
</ng-container>
@Component(
providers: [
{ provide: ABC, useClass: ConcreteAClass }
]
)
function fixCategories() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
var newData = new Array();
var map = {
'Subscriptions': ['netflix', 'google music'],
function fixCategories() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
var newData = new Array();
var map = {
'Subscriptions': ['netflix', 'google music'],
@alexluecke
alexluecke / sh
Created March 30, 2017 01:57
Sample render-asset.sh for modifying Arc theme
#! /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"
#!/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

Start TMUX at login

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