Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar
:bowtie:
Coding…

icaoberg icaoberg

:bowtie:
Coding…
View GitHub Profile
@icaoberg
icaoberg / script.sh
Created August 22, 2019 14:44
Convert all webp files to png
#!/bin/bash
for F in *.webp
do
dwebp $F -o $F.png
done
@icaoberg
icaoberg / script.py
Created July 4, 2019 05:27
HackerRank - Interview -Arrays - Left Rotation
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the rotLeft function below.
def rotLeft(a, d):
@icaoberg
icaoberg / script.sh
Created July 20, 2018 01:39
Rename all files in the current directory
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Last active July 20, 2018 01:23
Compress all folders in the current directory
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 01:01
Remove all empty files in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 00:52
Remove duplicate files in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 00:50
Remove all empty folder in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / newpost.sh
Created July 3, 2018 14:35
Script that creates a basic post for Pelican Python
#!/bin/bash
# Copyright (C) 2018 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@icaoberg
icaoberg / decrypt.sh
Last active June 30, 2019 01:57
Simple decryption script
#!/bin/bash
# Copyright (C) 2018-2019 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@icaoberg
icaoberg / encrypt.sh
Last active July 3, 2018 14:30
Simple encryption script
#!/bin/bash
# Copyright (C) 2018 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but