Skip to content

Instantly share code, notes, and snippets.

View 5a494d's full-sized avatar
🌴
On vacation

5a494d 5a494d

🌴
On vacation
View GitHub Profile
@5a494d
5a494d / .theia-settings.json
Created June 8, 2024 00:58
Theia settings for django container with sonarqube
{
"sonarlint.disableTelemetry": true,
"sonarlint.ls.javaHome": "/usr/lib/jvm/java-17-openjdk-amd64",
"sonarlint.output.showAnalyzerLogs": true,
"sonarlint.output.showVerboseLogs": true,
"sonarlint.trace.server": "verbose",
"python.autoComplete.extraPaths": [
"/home/project/src",
],
"python.analysis.extraPaths": [
@5a494d
5a494d / find.sh
Created September 23, 2021 03:18 — forked from gr1ev0us/find.sh
Cheatsheet for find linux
# List of cheatsheet for linux find.
# Taken from here http://alvinalexander.com/unix/edu/examples/find.shtml
# basic 'find file' commands
# --------------------------
find / -name foo.txt -type f -print # full command
find / -name foo.txt -type f # -print isn't necessary
find / -name foo.txt # don't have to specify "type==file"
find . -name foo.txt # search under the current dir
find . -name "foo.*" # wildcard
@5a494d
5a494d / docker-aliases.sh
Created August 28, 2021 21:46 — forked from mspronk/docker-aliases.sh
Useful Docker Aliases
function help-fn {
echo "`cat <<EOF
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
@5a494d
5a494d / clean.sh
Created August 4, 2020 19:21 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@5a494d
5a494d / install-composer.sh
Created November 24, 2019 05:51
Install composer globally
#!/bin/sh
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
@5a494d
5a494d / gist:613ec74f35737759b8c289db9b6eb60d
Created August 20, 2019 02:53
docker.container.iterator.sh
#!/bin/bash
list=$(docker ps)
IFS=$'\n' array=($list)
for index in "${!array[@]}"
do
declare -a a=("${array[index]}")
printf "%s\n" "${a[@]}"
done
@5a494d
5a494d / gist:f6990276ff411ff60d36c4513b0f20eb
Created April 9, 2019 03:14 — forked from bkemper/gist:ca6ac68b174a047b5ccde3930c8568dc
How to edit a commit with interactive rebase

While on a branch with a couple of commits, you can edit a commit with interactive rebase. This should be used sparingly and only on branches and never on master.

  1. Checkout the branch

$ git checkout my-branch

  1. Get the ref of the commit that you want to edit from the commit log. (e.g. 67b191fc62eda52b5b208cc4de50df7144a03171)

$ git log

@5a494d
5a494d / deluge-webui.md
Created January 3, 2019 22:41
Deluged for RaspberryPI 2

Automounting USB Drives

Identify the drive, in this case it's /dev/sda1 with a UUID of E033-1109 and type FAT:

Input

$ sudo blkid

Output

@5a494d
5a494d / gist:4ece221a93b134d9a7b191c9aa5238fe
Created December 11, 2018 16:12 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@5a494d
5a494d / setting-up-babel-nodemon.md
Created October 12, 2018 20:31 — forked from sam-artuso/setting-up-babel-nodemon.md
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y