Skip to content

Instantly share code, notes, and snippets.

@weshouman
weshouman / FromAnotherTerminal
Last active October 28, 2017 06:44
open a new terminal and execute some commands #bash
# TODO: understand the differnce between using the -e and -x commands, both seem exchangeable till now
gnome-terminal -e 'firefox'
#TODO: add a way for multilines
@weshouman
weshouman / CmakeIssues
Last active October 28, 2017 06:44
fixes used with cmake issues #study #setup
#my experience working with cmake errors
If a package wasn't found .. yet its installed
-open synaptic
-search for the package
-right-click and choose properties
-in installed directory or files section figure out where the libraries are
-u'll find some /*/*/*.so.## files, u'll need to copy them to their respective cmake options
-notes:
- some options may available only in the advanced window of ccmake .
@weshouman
weshouman / make install in custom dir
Last active October 28, 2017 06:43
make install in a custom directory #setup
use one of the following ways
(1) make install DESTDIR="/some/absolute/path"
(2) make DESTDIR="/some/absolute/path" install
(3) DESTDIR="/some/absolute/path" make install
(4) export DESTDIR="/some/absolute/path
make install
till now i've discovered 2 ways, either changing the CMAKE_INSTALL_PREFIX or making/changing the DESTDIR env var
@weshouman
weshouman / myps.sh
Last active October 28, 2017 06:43
my display sorted processes script #bash
#!/bin/bash
# ---
# @author newlido
# @version 0.1
#
# HOWTO:
# ./myps.sh
# No options yet
#
# Notes:
@weshouman
weshouman / gk liner
Last active October 28, 2017 06:42
git and kompare #vcs
# add to ~/.bashrc
# add the bash function "gk" to act as a git and kompare
# Usage: gk COMMIT_HASH
# for the reference check: http://denis.tumblr.com/post/50507027/using-kompare-for-git-diffs
gk () { git diff $* | kompare - ; }
@weshouman
weshouman / num_folders.sh
Last active October 28, 2017 06:42
make numbered folders with bash #bash #study
# knowledge needed
# for looping check: http://www.cyberciti.biz/faq/bash-for-loop/
# print format: http://linuxconfig.org/bash-printf-syntax-basics-with-examples
# operand pipelining: http://unix.stackexchange.com/questions/9597/giving-grep-output-to-rm
# uses this if formatting isn't important
# for V in {1..13}; do mkdir "my_num_folder_${V}"; done
# note $V_ is different from ${V}_
@weshouman
weshouman / installing Jenkins.md
Last active May 4, 2021 12:20
installing Jenkins notes #jenkins

Installation

Preinstallation

  • Java jre and jdk should be installed.

Steps on ubuntu

wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
@weshouman
weshouman / Installing Hubot
Last active October 28, 2017 06:41
installing hubot notes setup
Dependencies
------------
sudo apt-get update
## was requested but I already had it
sudo apt-get install build-essential
# installing node
sudo add-apt-repository -m ppa:chris-lea/node.js
# in case add-apt-repository wasn't found use $ sudo apt-get update
@weshouman
weshouman / Using Jenkins.md
Last active October 28, 2017 06:40
Customizing/using Jenkins #jenkins

Restart jenkins

That's how we restart jenkins service.

sudo service jenkins restart

Jenkins defaults

Are stored in /etc/default/jenkins.
Example: the default port named HTTP_PORT.

@weshouman
weshouman / .gitconfig
Last active October 28, 2017 06:40
useful git config/aliases #vcs
[user]
email = MYEMAIL
name = My Name
[alias]
co = checkout
ci = commit
st = status
di = diff
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all