View shrinkpdf.sh
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 | |
# use with | |
#chmod +x ./shrinkpdf.sh | |
# ./shrinkpdf.sh ./testin.pdf ./testout.pdf | |
# http://www.alfredklomp.com/programming/shrinkpdf | |
# Licensed under the 3-clause BSD license: | |
# | |
# Copyright (c) 2014-2019, Alfred Klomp | |
# All rights reserved. |
View erroring_tf_log.txt
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
Terraform v1.1.5 | |
on linux_amd64 | |
Initializing plugins and modules... | |
{"@level":"info","@message":"Terraform 1.1.5","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:52.985423Z","terraform":"1.1.5","type":"version","ui":"1.0"} | |
{"@level":"info","@message":"module.gcloud.null_resource.gcloud_init: Plan to replace","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:59.765190Z","change":{"resource":{"addr":"module.gcloud.null_resource.gcloud_init","module":"module.gcloud","resource":"null_resource.gcloud_init","implied_provider":"null","resource_type":"null_resource","resource_name":"gcloud_init","resource_key":null},"action":"replace","reason":"cannot_update"},"type":"planned_change"} | |
{"@level":"info","@message":"module.monitoring.module.stackdriver-alerting.google_monitoring_metric_descriptor.with_alert: Plan to replace","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:59.766321Z","change":{"resource":{"addr":"module.monitoring.module.stackdriver-alerting.google_monitoring_metric_descriptor.with |
View single_line_git_ignore.sh
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
# from https://stackoverflow.com/questions/16244969/how-to-tell-git-to-ignore-individual-lines-i-e-gitignore-for-specific-lines-of | |
# Run the following command: | |
git config --global filter.gitignore.clean "sed '/#gitignore$/d'" | |
# Now, either add a local file in .git/info/attributes | |
echo "*.extension_to_be_ignored filter=gitignore" > ./.git/info/attributes | |
# or write into a file that will be part of your code | |
echo "path_to_file_with_the_ignore_directive filter=gitignore" > ./.gitattributes |
View Named_Stash.sh
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
# From https://stackoverflow.com/a/64716636/2697831 | |
#A stash entry is a special ref that points to a commit. So you can simply tag the commit. | |
git stash push -m "debug" | |
# after "git stash", tag the last entry | |
git tag debug stash@{0} | |
# later use the tag name | |
git stash apply debug |
View astrobox_configuration_guidelines.sh
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
# Instalation guide | |
### solve locale problem on computer | |
export LC_ALL="en_US.UTF-8" | |
export LC_CTYPE="en_US.UTF-8" | |
sudo dpkg-reconfigure locales | |
### Setup automatic time update toward UTC | |
sudo apt-get install ntp |
View search_modified_after_date.sh
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
# From https://stackoverflow.com/questions/848293/shell-script-get-all-files-modified-after-date | |
find . -newermt '2021-11-14T23:00:00' |
View gist:970d0d30644a5162cd4e9068f49151ef
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
First task is to create your own token (generate new token): | |
https://github.com/settings/tokens | |
you can test it with | |
curl -u <token>:x-oauth-basic https://api.github.com/user | |
Then write it down to a specific file in home/user/subuser/.netrc , where you just created your directory | |
content of the file: | |
machine github.com |
View npm-using-https-for-git.sh
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
# npm using https for git | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
git config --global url."https://".insteadOf git:// | |
# npm using git for https | |
git config --global url."git@github.com:".insteadOf https://github.com/ | |
git config --global url."git://".insteadOf https:// |
View git-credential-netrc
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/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use File::Basename; | |
my $VERSION = "0.1"; |
View fstab
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
# CIFS with password in clear, or in a file | |
# content of /home/user/.smbcredentials looks like this: | |
# username=user.name | |
# password=password | |
# domain=WORKSPACE | |
//smbservername/foldername /home/user/foldername cifs uid=username,rw,user=smbuser,password=smbpassword,vers=3.0 0 0 | |
//smbservername/foldername /home/user/foldername cifs uid=username,rw,credentials=/home/user/.smbcredentials,vers=3.0 0 0 | |
# SSHFS |
NewerOlder