Skip to content

Instantly share code, notes, and snippets.

@ssledz
ssledz / bash-cheat-sheet
Created May 21, 2016 14:36
BASH Cheat Sheet
B A S H C H E A T S H E E T
to page output forward (only): command filename | more
to page output forward & back: command filename | less
to print a dataset: lp datasetname (-d printerid) (-o landscape)
USE OF QUOTATION MARKS
echo "$varname" = echo The value of \$varname is \"$varname\"
= echo "The value of \$varname is \"$varname\"."
$fred='Four spaces between these words.'
@ssledz
ssledz / enable_mongo.sh
Created June 16, 2016 23:24 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]
@ssledz
ssledz / idea.sh
Created July 10, 2016 16:29
Enhanced idea.sh
#!/bin/bash
JAVA_HOME=$(~/.jenv/bin/jenv javahome) $(dirname $(readlink -f "$0"))/bin/idea.sh
= Resources =
* zsh - http://www.zsh.org/
* ZSH-LOVERS - http://grml.org/zsh/zsh-lovers.html
* manual - http://zsh.sourceforge.net/Doc/Release/index.html
* oh-my-zsh - https://github.com/robbyrussell/oh-my-zsh
* prezo - https://github.com/sorin-ionescu/prezto
* zsh-users - https://github.com/zsh-users
= Functions =
@ssledz
ssledz / xsession.desktop
Created January 12, 2017 15:26
/usr/share/xsessions/xsession.desktop
[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession

Making Commits

changing the index

$ git add filename  # adding new file; adding changes to the existing file
$ git add -p        # adding partial changes; git add --patch (-p)
$ git add -u        # include all files in the current index; this includes changed and deleted files, 
                    # but not new ones.
$ git add -A        # include all filenames in the index and in the working tree; this stages new 
                    # files as well
@ssledz
ssledz / awesome-wm
Last active January 20, 2017 00:39
# Testing
sudo apt-get install xserver-xephyr
Xephyr :1 -ac -br -noreset -screen 1600x900 &
DISPLAY=:1.0 awesome -c ~/.config/awesome/rc.lua
# creating uber jar
mvn assembly:single -DdescriptorId=jar-with-dependencies
# adding main class to manifest
echo "Main-Class: pl.bpo.red.model.CliEntryPoint" > manifest.local;
jar ufm app.jar manifest.local
# generate new project
mvn -B archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \

Java Libs

  • trove - The Trove library provides high speed regular and primitive collections for Java.