Skip to content

Instantly share code, notes, and snippets.

View Cellane's full-sized avatar

Cellane

View GitHub Profile
#!/usr/bin/env bash
echo "Refresh interval in seconds: "
read interval
function received () {
local received=`netstat -s -p tcp | grep 'acks' | grep 'bytes' | awk '{ print $4 }'`
echo "${received}"
}
#!/usr/bin/env bash
echo -n "Zdrojová cesta: "
read zdrojova
echo -n "Cílová cesta: "
read cilova
echo -n "Skupina: "
read skupina
#!/usr/bin/env bash
echo -n "Zdrojový adresář: "
read zdroj
echo -n "Cílová cesta: "
read cil
echo -n "Stáří (ve formátu AwBdChDmEs): "
read datum
fillMenuItem = new fillActionClass ("Fill", KeyStroke.getKeyStroke (KeyEvent.VK_5, shortcutKeyMask));
private class fillActionClass extends G_Action implements ActionListener {
public void actionPerformed (ActionEvent e) {
activeTaskId = 4;
}
}
public class G_Action extends AbstractAction {
public G_Action () {
#!/usr/bin/env bash
echo -n "Zdrojový adresář: "
read zdroj
echo -n "Cílová cesta: "
read cil
echo -n "Přípona: "
read pripona
#!/usr/bin/env bash
echo -n "Adresář: "
if [ -d $adresar ]; then
find $zdroj -type f -regex ".*\.sh" -exec chown u+x '{}' ';' 2>/dev/null
else
echo "Adresář neexistuje!"
fi
\documentclass{beamer}
\usetheme{Montpellier}
\usefonttheme{serif}
\usecolortheme{crane}
\usenavigationsymbolstemplate{}
\setbeamercovered{dynamic} % or transparent?
\usepackage{polyglossia}
\setdefaultlanguage{czech}
public class StudentTest {
public static void main (String args[]) {
Student student1, student2;
student1 = new Student ();
student2 = new Student ("Sue", 1980, "Informatics", 60);
student1.print ();
student2.print ();
}
\documentclass[]{article}
\usepackage{fontspec}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
[scale=3,line cap=round,
private void drawLineBresenham (int startX, int startY, int endX, int endY, G_Color color) {
int dY = endY - startY;
int dX = endX - startX;
int fraction, stepX, stepY;
if (dY < 0) {
dY = -dY;
stepY = -1;
} else {
stepY = 1;