Skip to content

Instantly share code, notes, and snippets.

View nathanielvarona's full-sized avatar

Nathaniel Varona nathanielvarona

View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 4, 2024 20:35
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@sebradloff
sebradloff / Dockerfile
Created March 3, 2018 18:26
Setup for remote logs s3, airflow 1.9.0
# Showing the necessary part of adding the logging config to the python path
COPY config/log_config.py config/log_config.py
COPY config/__init__.py config/__init__.py
RUN chown -R airflow: ${AIRFLOW_HOME}
ENV PYTHONPATH ${PYTHONPATH}:/usr/lib/python2.7/site-packages/:${AIRFLOW_HOME}/config/
@ifnull
ifnull / README.md
Created October 8, 2017 04:53
Supervisor + Ngrok
apt-get install supervisor ngrok

Create the config files

  • /root/.ngrok2/ngrok.yml
  • /etc/supervisor/conf.d/ngrok.conf
supervisorctl reread
@athityakumar
athityakumar / powerlevel9k.config
Created July 6, 2017 18:38
Powerlevel9k oh-my-zsh theme configuration for screenshots used in https://github.com/athityakumar/colorls
export ZSH=$HOME/.oh-my-zsh
export DEFAULT_USER='athityakumar'
TERM=xterm-256color
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
@renchap
renchap / README.md
Last active October 12, 2022 17:14
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@fabsrc
fabsrc / fb.js
Last active May 11, 2016 17:44
Change Facebook Profile Picture with Nightmare.js
var Nightmare = require('nightmare');
function changeFacebookProfilePicture(email, pass, id) {
new Nightmare({
show: false,
'webPreferences':{
partition: 'nopersist'
}
}).goto('https://facebook.com')
// .screenshot(__dirname + '/00.png')
@SantoshSrinivas79
SantoshSrinivas79 / Running electron using xvfb.md
Last active April 24, 2024 03:09
Running electron using xvfb

Running electron using xvfb

Install xvfb

apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

Some tips at: xvfb init script for Ubuntu

@alkavan
alkavan / CentOS_7.x_(PHP_7.3_Postgres_10.x).md
Last active September 10, 2021 00:54
CentOS 7.x - Web Server Bootstrap (DigitalOcean/Bluemix)

CentOS 7.x - Web Server Bootstrap

General (and init)

Update system

yum update

Set your timezone

@pablitoc
pablitoc / configure_proxy_protocol.md
Last active April 12, 2023 15:21
Configuring Proxy Protocol

##Install AWS CLI Tools##

  1. Install AWS CLI Tools. You can also use the EC2 API Tool if you are more comfortable with them. But this write-up uses the EC2 CLI.
  2. Create a user via Amazon IAM or download the security accessID and securitykey you will need it to query Amazon CLI.
  3. using Terminal cd into .aws directory cd ~/.aws edit or create new file named config paste the following contents inside.
    `[default]`
    `aws_access_key_id = ACCESS_ID`
    `aws_secret_access_key = SECRET_ID`
    `output = json OR bson OR text`
    `region = PREFERRED_AWS_REGION`

Save the file as "config"