This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script origin @ https://gist.github.com/delphym/687927bf521f598714e27804304ceca4 | |
# Setup | |
# | |
# - Create a new Jenkins Job | |
# - Mark "None" for Source Control Management | |
# - Select the "Build Periodically" build trigger | |
# - configure to run as frequently as you like | |
# - Add a new "Execute Shell" build step |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# source of the script can be found at: https://gist.github.com/ad3bbd9d5cafea47bfd66367a0a8cdb6.git | |
#Check the space on the computer before clean up | |
df -h | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo fdisk /dev/sdb -l | |
#Disk /dev/sdb: 477 GiB, 512110190592 bytes, 1000215216 sectors | |
#Units: sectors of 1 * 512 = 512 bytes | |
#Sector size (logical/physical): 512 bytes / 512 bytes | |
#I/O size (minimum/optimal): 512 bytes / 512 bytes | |
#Disklabel type: gpt | |
#Disk identifier: 04361FB4-3666-4BD1-8D46-6609C315D81B | |
#Device Start End Sectors Size Type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_1604.2018.510.0_x64__79rhkp1fndgsc_ubuntu.exe] | |
"ColorTable00"=dword:00312700 | |
"ColorTable01"=dword:00c77520 | |
"ColorTable02"=dword:00058972 | |
"ColorTable03"=dword:00859125 | |
"ColorTable04"=dword:00241bd0 | |
"ColorTable05"=dword:006e1bc6 | |
"ColorTable06"=dword:000577a5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script origin @ https://gist.github.com/delphym/b3598bc91d685514693f94bd495e58cc#file-git-undo-sh | |
## To recover all unstaged deletions at once, automatically, without specifying each single path: | |
git ls-files -d | xargs git checkout -- | |
## To recover all staged deletions at once, automatically, without specifying each single path: | |
# git status | grep 'deleted:' | awk '{print $2}' | xargs git checkout -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## Script location: https://gist.github.com/delphym/2079545c6ba8b30e1284393812116242#file-flashall-sh | |
## For flashing full Android and our images to the device | |
AMSSROOT=AMSS | |
ANDROIDROOT=Android | |
ls -1 -I "*.txt" -I "*.md5" | awk -F'.' '{print "fastboot flash "$1" "$1"."$2}' [17:16:26] | |
fastboot flash dsp $AMSSROOT/adspso.bin | |
fastboot flash bluetooth $AMSSROOT/BTFM.bin | |
fastboot flash cmnlib $AMSSROOT/cmnlib.mbn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. list all remote tags | |
git ls-remote --tags | |
2. delete local tag | |
git tag -d V_1_0_1 | |
3. push tag deletion to remote | |
git push origin :refs/tags/V_1_0_1 | |
4. tag local branch again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Howto capture regexp group and print it | |
ll -1 | |
em110msp_1.0.13-10_release-unsigned.apk | |
em110msp_1.0.13-10_release-unsigned.json | |
# daniel@mcs-Ubuntu: | |
ls -1 | pcregrep -o2 "(.*)_(.*)_(.*)(.apk|.pom|.json)$" | |
1.0.13-10 | |
1.0.13-10 | |
### -o, --only-matching=n show only the part (#group) of the line that matched |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Recursively find and replace text in files under a specific folder with preview of changed data in dry-run mode. | |
The preview is automatically shown in `--dry-run` mode. | |
To also show the preview for write mode use the verbose flag, i.e. `--verbose` or `-v`. | |
Parameters should preferrably use single quotes, especially for the glob switch, i.e. `--glob='*.html'`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Colors] | |
InverseCursor=0 | |
InverseSelection=0 | |
BackColor=3549952 | |
ForeColor=9868419 | |
MarkColor=3093212 | |
CursorColor=35253 | |
1CursorText=-1 | |
BackColor2=4339200 | |
ThumbnailFrame=-2 |
OlderNewer