Skip to content

Instantly share code, notes, and snippets.

View btamayo's full-sized avatar
🏠
Working from home

Bianca Tamayo btamayo

🏠
Working from home
View GitHub Profile
@btamayo
btamayo / crontab-entry
Created November 23, 2018 22:50 — forked from rendicott/crontab-entry
quick backup script to tar and gzip the jenkins home directory and upload it to Artifactory for backup
5 18 * * * /root/jenkins-backup-to-artifactory.sh >/var/log/jenkinsbackup/jenkinsbackup.`date +\%Y\%m\%d\%H\%M\%S`.log 2>&1
@btamayo
btamayo / intro.md
Created November 21, 2018 20:46 — forked from derhuerst/intro.md
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@btamayo
btamayo / regex.sh
Created September 7, 2018 18:43
Useful one-line scripts for sed
# | Source : http://sed.sourceforge.net/sed1line.txt
# | -------------------------------------------------------------------------
# | USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
# | Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
# |
# | Latest version of this file (in English) is usually at:
# | http://sed.sourceforge.net/sed1line.txt
# | http://www.pement.org/sed/sed1line.txt
# |
# | This file will also available in other languages:
@btamayo
btamayo / certs.sh
Created August 22, 2018 18:12 — forked from jimblom/certs.sh
Update Java cacerts
#!/bin/sh
# certs.sh
# use this for Yocto/Edison:
LIB=lib
# use this for WRLinux/Gateway
# LIB=lib64
if [ -f /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts ]; then
mv /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts \
@btamayo
btamayo / 1. linux utilities.md
Created August 10, 2018 21:13 — forked from Integralist/1. linux utilities.md
Different Linux utility commands (e.g. top, ps, strace, lsof, netstat, ifconfig, iftop, iptraf, tcpdump, wireshark)

Start up a container (whichever Linux flavour takes your fancy):

docker run -it ubuntu /bin/bash
docker run -it centos /bin/bash
  • top: check what CPU and Memory running processes are utilising
  • ps: see what processes are running
  • strace: monitor interactions between processes
@btamayo
btamayo / kubernetes_add_service_account_kubeconfig.sh
Created August 7, 2018 06:09 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@btamayo
btamayo / MANUAL.md
Created July 13, 2018 23:00 — forked from s-lyn/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@btamayo
btamayo / easyrsa3-quick-wildcardcert
Created July 9, 2018 19:59 — forked from DRN88/easyrsa3-quick-wildcardcert
easyrsa3-quick-wildcardcert
#!/bin/bash
FQDN="domain.local"
CERT_FILENAME="wildcard.${FQDN}"
CERT_COMMONNAME="*.${FQDN}"
wget "https://github.com/OpenVPN/easy-rsa/archive/master.zip"
unzip master.zip
mv easy-rsa-master/easyrsa3/ .
rm -rf master.zip easy-rsa-master/
@btamayo
btamayo / check_page_speed.cpp
Created July 5, 2018 20:49 — forked from jglenn9k/check_page_speed.cpp
Checks page speed
#include <iostream>
#include <string>
#include <cstdio>
#include <curl/curl.h>
// James Glenn <[email protected]>
// 2018-03-30
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
((std::string*)userp)->append((char*)contents, size * nmemb);
@btamayo
btamayo / npm-scripts-for-docker.md
Created June 30, 2018 03:22 — forked from duluca/npm-scripts-for-docker.md
npm scripts for Docker

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

Looking for npm scripts for AWS ECS? Go here!

Watch the video: Do More With Less JavaScript

Docker Containers for Static or Angular/React/Vue/etc SPA Websites