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
# check the current layout settings | |
localectl status | |
# System Locale: LANG=en_CA.UTF-8 | |
# VC Keymap: ca-multix | |
# X11 Layout: ca | |
# X11 Model: apple | |
# X11 Variant: multix | |
# the command to set keyboard layout is |
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
FUNCTION inpoly_complex2(x,y,n,xx,yy) | |
!------------------------------------------------------------------------------- | |
! Determines if a point xx,yy is inside a complex polygon | |
! defined by x(n),y(n), | |
! ref : https://wrfranklin.org/Research/Short_Notes/pnpoly.html | |
! | |
!------------------------------------------------------------------------------- | |
implicit none | |
! arguments | |
integer n |
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
program main | |
implicit none | |
interface | |
subroutine to_be_called(arg, nx, ny, arr) | |
integer :: arg, nx, ny | |
integer, allocatable, intent(out) :: arr(:, :) |
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 sys | |
import math | |
g = 9.8 | |
r = 6400e3 | |
# problem 5.42 from Savchenko | |
def e0(v): | |
# total energy |
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
# Calculate an average time for a maestro task, using ksh and logs stored in the stats folder | |
grep surge_run *_avg | grep -P -o 'EXECTIME=\K\d+:\d+:\d+' | xargs -I % ksh -c 'h=$(echo % | cut -d ":" -f 1);m=$(echo % | cut -d ":" -f 2);s=$(echo % | cut -d ":" -f 3); echo $(((h * 3600 + m * 60 + s)/60.))' | awk 'BEGIN{s=0;}{s+=$1;}END{print s/NR;}' |
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
%% Inspired from http://www.texample.net/tikz/examples/circular-arrows-text/ | |
\PassOptionsToPackage{dvipsnames}{xcolor} | |
\documentclass[tikz,border=10pt]{standalone} | |
\usetikzlibrary{decorations.text} | |
\usepackage{libertine} | |
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 | |
# save the listing into an array | |
z=($(ls -a)) | |
# loop through the array elements and print the sizes (skip the "." and "..") | |
for zi in ${z[@]:2}; do | |
du -sh ${zi} | |
done |
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 | |
# exit on error | |
set -e | |
the_list=($( port installed | grep -v active | grep -v : )) | |
size=${#the_list[@]} | |
let size=$size-1 | |
echo $size |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
# This is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = Oleksandr Huziy | |
email = [email protected] | |
[push] | |
default = simple | |
[alias] | |
s = status -s | |
lg = log --oneline --decorate --all --graph |
NewerOlder