Skip to content

Instantly share code, notes, and snippets.

Avatar
📡
λ。λ

Guy Valariola guychouk

📡
λ。λ
View GitHub Profile
@guychouk
guychouk / scrape.sh
Created Jun 19, 2022
🌄 Scrape IMGs from HTML page using html-xml-utils.
View scrape.sh
#!/bin/sh
# Here is the original URL used to test this on:
# http://www.ghibli.jp/info/013251/
curl -s $1 | hxwls | grep -E "(jpg|png)" | grep -v thumb | xargs -I{} curl -s -O {}
@guychouk
guychouk / k8s.sh
Last active Jun 19, 2022 — forked from ipedrazas/gist:83326e03c9d893a3ab1bdbd048d2e6be
Curl Kubernetes API Server from a Pod
View k8s.sh
#!/bin/bash
curl -k -X GET \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
https://$KUBERNETES_PORT_443_TCP_ADDR:$KUBERNETES_SERVICE_PORT_HTTPS
@guychouk
guychouk / install.sh
Last active Jun 19, 2022
LEMP Installation with PHP8
View install.sh
#!/bin/bash
apt update
apt upgrade
apt install gnupg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
apt update
apt install -y \
@guychouk
guychouk / README.md
Last active Jun 19, 2022
Simple code deployment via a Github Action that uses git and rsync.
View README.md

Simple Deployment 🚀

  • Install nginx and rsync on the server (using Debian as an example):
apt install -y nginx rsync 
  • Add the github user:
adduser --disabled-password --gecos "" --home /home/github github
@guychouk
guychouk / headless-vm.cmd
Last active Jun 19, 2022
Start Headless VirtualBox VM on Windows.
View headless-vm.cmd
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm lab --type headless
@guychouk
guychouk / config
Created Mar 2, 2021
🔒 A sane base config for SSH.
View config
ForwardAgent true
# Necessary for not breaking ssh on linux
IgnoreUnknown UseKeychain
# Use Keychain on macos - ignored on linux
UseKeychain yes
Host *
# This will look for private keys under the `~/.ssh/keys`
@guychouk
guychouk / zetz
Last active Jun 25, 2022
⚡️ Zetz: an fzf-based note taking app
View zetz
#!/usr/bin/env zsh
#
# _______| |_ ____
# |_ / _ \ __|_ /
# / / __/ |_ / /
# /___\___|\__/___|
#
# The most basic note taking app for the terminal.
#
@guychouk
guychouk / nfl-teams.json
Last active Mar 15, 2021
🏈 NFL Teams JSON
View nfl-teams.json
[
{
"code": "ARI",
"fullName": "Arizona Cardinals",
"shortName": "Arizona"
},
{
"code": "ATL",
"fullName": "Atlanta Falcons",
"shortName": "Atlanta"
@guychouk
guychouk / macros.ahk
Last active Mar 15, 2021
🤖 macros.ahk - My macros AutoHotkey script.
View macros.ahk
; Config ;
#SingleInstance force ; Force a single instance of this script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Menu, Tray, icon, macros.ico ; Set system tray icon to robot arm
SetCapsLockState, AlwaysOff ; Set caps lock state to always be off
; Remappings ;
@guychouk
guychouk / README.md
Last active Jan 26, 2021
How to solve PGP key validation errors when installing Arch on VirtualBox VM.
View README.md

If you're running a version of Windows 10 that supports Hyper-V, and you want to use VirtualBox properly, make sure to run the following in an elevated Powershell window:

bcdedit /set hypervisorlaunchtype off

Now simply restart your Windows machine, and once it's back up, proceed to install Arch on a VM as you normally would, everything should work now.

Taken from this lifesaving comment on the Arch forums.