Skip to content

Instantly share code, notes, and snippets.

View denysvitali's full-sized avatar

Denys Vitali denysvitali

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@EugeneKud
EugeneKud / gist:5057685
Created February 28, 2013 15:47
LATEX : Swiss Letter
\documentclass[fontsize=12pt,paper=a4]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}
\LoadLetterOption{SN} %Swiss Letter standards
\KOMAoptions{
enlargefirstpage=true, % letter should hold on one page
headsepline=false,
@jbonney
jbonney / spotify_keybindings
Created June 9, 2013 13:22
Spotify - Linux key bindings. From XFCE / Ubuntu keyboard shortcuts configuration, assign the control command to their key. http://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious
@roooodcastro
roooodcastro / GraphPanel.java
Last active February 2, 2024 21:28
A simple Swing component to draw a Graph over a regular JPanel. Features a grid, customizable amount of hatch marks, axis labels,checking for minimum and maximum value to label correctly the Y-axis and customizable padding and label padding. Based on "Hovercraft Full Of Eels"'s answer on StackOverflow (http://stackoverflow.com/questions/8693342/…
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.Stroke;
import java.util.ArrayList;
/**
* Function for generating ESR-numbers for orange swiss payment slips (so called "Oranger Einzahlungsschein").
*
* @author Jason Rubichi, Nicolas Zanotti
* @param
* bc: fix, 01 or 04
* chf: dynamic, amount in chf without rappen, must have eight chars minimum (if less than eight chars, insert zeros before)
* rappen: dynamic, amount in rappen
* help1, help2, help3: fix, "+" or ">", no editing required
* referenceNumber: dynamic, contains matag number, zeros, client number and job number
@Tydus
Tydus / howto-standalone-toolchain.md
Last active May 4, 2023 13:43
How to install Standalone toolchain for Android

HOWTO Cross compiling on Android

5W1H

What is NDK

NDK (Native Develop Toolkit) is a toolchain from Android official, originally for users who writes native C/C++ code as JNI library. It's not designed for compiling standalone programs (./a.out) and not compatible with automake/cmake etc.

What is Standalone Toolchain

"Standalone" refers to two meanings:

  1. The program is standalone (has nothing connect to NDK, and don't need helper scripts to run it)
  2. The toolchain is made for building standalone programs and libs, and which can used by automake etc.

(Optional) Why NDK is hard to use

By default, NDK uses android flavor directory structure when it's finding headers and libs, which is different from GNU flavor, so the compiler cannot find them. For Example:

With TigerVNC

TigerVNC is the only vnc client that seems to support proxmox's SSL encryption scheme.

If you're willing to install it on your client, run the following:

ssh -L 1234:localhost:1234 mimosa.tree.ewdev.ca -l root -- socat tcp-l:1234,range=127.0.0.1/32 exec:"'"qm vncproxy 119"'"

tigervnc localhost:1234
@rischanlab
rischanlab / matlab.desktop
Created May 20, 2014 06:27
Create Shortcut application in Desktop Ubuntu
#in this case I use matlab application in Ubuntu
sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png
#download image for matlab
#go to this path
/usr/share/applications/matlab.desktop
#Insert this content to the matlab.desktop
[Desktop Entry]
### Keybase proof
I hereby claim:
* I am renchap on github.
* I am renchap (https://keybase.io/renchap) on keybase.
* I have a public key whose fingerprint is 1472 7DB9 0955 2EE8 8263 20C6 78AB 8C20 FBA2 CD92
To claim this, I am signing this object:
@tstellanova
tstellanova / jetson_hdmi_config.md
Last active May 26, 2021 10:30
Enable and Disable HDMI display on Jetson TK1

All operations as root:

turn off HDMI:

echo -1 > /sys/kernel/debug/tegra_hdmi/hotplug
echo 4 > /sys/class/graphics/fb0/blank

turn on HDMI: