sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
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 | |
# This code is based on the awesome answer by @torek from StackOverflow: | |
# https://stackoverflow.com/a/41626019/195417 | |
# I have only made a shell for his code, added some options, added some colors | |
# and voilà! | |
# | |
# This script can be used to find large files inside a git repository | |
# and it's whole history. It will list files larger than a given threshold, | |
# and display these files in a colored human readable way. | |
# |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'git://git.wincent.com/command-t.git' |
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
:3,10s/^/\#/g |
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
// Original source: https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/HelloWorld.java?view=markup | |
// LICENSE: http://www.apache.org/licenses/LICENSE-2.0 | |
@Grapes( | |
@Grab(group='org.apache.pdfbox', module='pdfbox', version='2.0.19') | |
) | |
import org.apache.pdfbox.pdmodel.PDDocument | |
import org.apache.pdfbox.pdmodel.PDPage | |
import org.apache.pdfbox.pdmodel.PDPageContentStream |
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
@Grapes( | |
[ | |
@Grab(group='software.amazon.awssdk', module='bom', version='2.10.86', type='pom'), | |
@Grab(group='software.amazon.awssdk', module='codedeploy', version='2.10.86'), | |
@Grab(group='ch.qos.logback', module='logback-classic', version='1.2.3') | |
] | |
) | |
import software.amazon.awssdk.services.codedeploy.* | |
import software.amazon.awssdk.regions.* |
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
# Shell | |
# pip --version | |
# pip install psycopg2-binary | |
import psycopg2 as pg | |
import pandas as pd | |
connection = pg.connect("host='host-name-here' dbname=DBNAME user='username' password='password'") | |
df = pd.read_sql_query("SELECT * FROM product", connection) |
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
// mvn dependency:list | egrep -i 'mujahidk' | |
def output = "mvn dependency:list | egrep -i 'mujahidk'".execute().text | |
print '%html ' | |
println '<table>' | |
output.split("\r\n").each { line -> | |
def result = line ==~ /\[INFO\]\s+(([\w\-\.])*:){3,6}.*/ |
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
@Grapes( | |
[ | |
@Grab(group='com.github.rjeschke', module='txtmark', version='0.13') | |
] | |
) | |
import com.github.rjeschke.txtmark.* | |
def markdown = ''' | |
# Heading 1 |
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
SELECT | |
level | |
FROM | |
dual | |
CONNECT BY 1 = 1 AND level <= 20; |
NewerOlder