Skip to content

Instantly share code, notes, and snippets.

View nightlyworker's full-sized avatar

nightlyworker

View GitHub Profile
@nightlyworker
nightlyworker / gsi-with-nuxt.md
Created July 3, 2023 21:18 — forked from srestraj/gsi-with-nuxt.md
Integrate Google Sign-in and One-tap with Nuxt.js

Integrate Google Sign-in (Popup method) with Nuxt.js - Works in Incognito mode as well

Nuxt 3 version here.
Add GSI client in your nuxt.config.js
export default {
  ...

Setup tor proxy on Arch Linux

Copied from this article.

Installation

  1. Install tor

         $ sudo pacman -S tor
         $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.

$ sudo pacman -S nyx

@nightlyworker
nightlyworker / docker-compose.yml
Created December 27, 2020 22:03 — forked from axw/docker-compose.yml
Docker Compose with Elastic Stack and APM Server 6.5.0
version: "2.1"
services:
apm-server:
image: docker.elastic.co/apm/apm-server:${STACK_VERSION:-6.5.0}
ports:
- "127.0.0.1:${APM_SERVER_PORT:-8200}:8200"
- "127.0.0.1:${APM_SERVER_MONITOR_PORT:-6060}:6060"
command: >
apm-server -e
-E apm-server.rum.enabled=true
@nightlyworker
nightlyworker / gist:94e0fdf1148e0a04f9230f123cd0f4a5
Created May 21, 2020 00:41 — forked from hpatoio/gist:4398399
Create a MySQL database and create a user with all grant on it
CREATE USER 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD';
GRANT USAGE ON * . * TO 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `DB_USERNAME` ;
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'localhost';
#For connection from everywhere
GRANT USAGE ON * . * TO 'DB_USERNAME'@'%' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'%';
@nightlyworker
nightlyworker / country_date_formats.csv
Created October 15, 2016 05:19 — forked from mlconnor/country_date_formats.csv
Listing of countries with their preferred date formats, ISO3166 code, ISO629-2
ISO 3166 Country Code ISO639-2 Country Code Country ISO 3166 Country Code ISO639-2 Lang Language Date Format
ALB AL Albania sqi sq Albanian yyyy-MM-dd
ARE AE United Arab Emirates ara ar Arabic dd/MM/yyyy
ARG AR Argentina spa es Spanish dd/MM/yyyy
AUS AU Australia eng en English d/MM/yyyy
AUT AT Austria deu de German dd.MM.yyyy
BEL BE Belgium fra fr French d/MM/yyyy
BEL BE Belgium nld nl Dutch d/MM/yyyy
BGR BG Bulgaria bul bg Bulgarian yyyy-M-d
BHR BH Bahrain ara ar Arabic dd/MM/yyyy
@nightlyworker
nightlyworker / rethinkdb_tls_guide.md
Created August 31, 2016 02:12
RethinkDB TLS Guide

RethinkDB with TLS

Thinker Lock

What You'll Need

To follow this guide, you will need Docker v1.10 or higher. Docker v1.10 has some volume and networking features that will come in handy for setting up a cluster. While this guide uses a single host with a cluster composed of several RethinkDB containers, the multi-host networking features of Docker can be used

@nightlyworker
nightlyworker / create-jwt-using-unix-commands-on-mac.md
Created August 11, 2016 06:55 — forked from indrayam/create-jwt-using-unix-commands-on-mac.md
Create JWT Token Header Using Unix Command line tools ONLY!

Pseudocode:

Y = Base64URLEncode(Header) + ‘.’ + Base64URLEncode(Payload)
JWT = Y + ‘.’ + Base64URLEncode(HMACSHA256(Y))

The steps called out here should work on a Mac as well. The only thing that might be different is the sed command used below. Instead of using -E, you will have to use -r to run sed with extended regular expression support

Use data from this tutorial:

scotch.io

@nightlyworker
nightlyworker / INSTALL.rst
Created July 26, 2016 02:00 — forked from jensens/INSTALL.rst
sentry setup with docker-compose

In order to run this image do: docker-compose up -d to get all up. On first run DB initialization and initial user setup is done like so:

First start a bash in the container: docker-compose exec sentry /bin/bash. Then, inside bash, do sentry upgrade wait until it asks you for an inital user. When finished exit the bash.

When in doubt check with docker-compose ps if all went fine.

@nightlyworker
nightlyworker / docker.aliases
Created March 25, 2016 00:35
Docker Bash Aliases
#!/bin/bash
# Use these in your .dotfiles to help make Docker more manageable
$(boot2docker shellinit 2> /dev/null)
alias dip='boot2docker ip 2> /dev/null'
alias dkd="docker run -d -P"
alias dki="docker run -t -i -P"
db() { docker build -t="$1" .; }
<html>
<head>
<script>
var locations = {
"speedtestwe": "West Europe",
"speedtestsea" : "Southeast Asia",
"speedtestea": "East Asia",
"speedtestnsus": "North Central US",
"speedtestne": "North Europe",
"speedtestscus": "South Central US",