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
#!/bin/bash | |
tmpfile=`mktemp` # name for temp file in /tmp | |
tmux pipe-pane -t matlab:matlab -o "cat > $tmpfile" | |
while read line | |
do | |
line=${line//;/\\;} # replace ; with \; to pass send-keys of tmux | |
tmux send-keys -l -t matlab:matlab "$line" # send keys literaly | |
tmux send-keys -t matlab:matlab Enter | |
sleep 0.2s # wait until the commands are put to tmux |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ |
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
-- xmobar config used by Vic Fryzel | |
-- Author: Vic Fryzel | |
-- http://github.com/vicfryzel/xmonad-config | |
Config { | |
--font = "xft:Fixed-8", | |
font = "xft:Source Han Sans:size=9:bold:antialias=true", | |
fgColor = "#7F8C8D", | |
bgColor = "#000000", | |
position = Top, |
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
prettyShow :: (Show a, Num a) => SymbolicManip a -> String | |
prettyShow val = prettyShowPrec 0 val | |
-- Show a number or symbol as a bare number or serial | |
prettyShowPrec _ (Number x) = show x | |
prettyShowPrec _ (Symbol x) = x | |
prettyShowPrec _ (UnaryArith opstr a) = | |
opstr ++ "(" ++ show a ++ ")" |
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
import XMonad | |
import Control.Monad (liftM2) | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Util.EZConfig | |
-- import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Layout.OneBig | |
-- import XMonad.Layout.Spacing | |
import XMonad.Layout.PerWorkspace (onWorkspace) | |
import XMonad.Layout.NoBorders (noBorders) |
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
URxvt*font: xft:SauceCodePro\ Nerd\ Font:size=12,\ | |
xft:DejaVu\ Sans\ Mono\ for\ Powerline:size=12,\ | |
xft:WenQuanYi\ Zen\ Hei:size=12,\ | |
xft:Microsoft\ YaHei:size=12 | |
xterm*font: xft:Source\ Code\ Pro:size=12:style=Regular | |
! URxvt*boldFont: xft:Source\ Code\ Pro\ for\ Powerline:size=12 | |
! Scrollbar |
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
" vim: fdm=marker ts=2 sts=2 sw=2 fdl=0 | |
if has('nvim') | |
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 | |
set termguicolors | |
else | |
" True color for vim inside st | |
let &t_8f = "[38;2;%lu;%lu;%lum" | |
let &t_8b = "[48;2;%lu;%lu;%lum" | |
set termguicolors |
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
{-# LANGUAGE OverloadedStrings #-} | |
import DBus | |
import DBus.Client | |
import Control.Monad (forever) | |
import Control.Concurrent (threadDelay) | |
import System.IO | |
fakeSignal :: Signal | |
fakeSignal = undefined |
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
# initialization file (not found) |
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
// canCross(i, k): can cross at the ith unit when last jump was k units | |
// canCross(i, k) = canCross(i + k - 1, k-1) || canCross(i + k, k) || canCross(i + k + 1, k + 1) | |
// canCross(i, 1) = canCross(i, 0) || canCross(i + 1, 1) || canCross(i+2, 2) | |
var memo map[int]map[int]bool | |
func canCross(stones []int) bool { | |
memo = make(map[int]map[int]bool, len(stones)) | |
stonesMap := make(map[int]bool, len(stones)) | |
for _, v := range stones { | |
stonesMap[v] = true |
OlderNewer