Skip to content

Instantly share code, notes, and snippets.

View kendofriendo's full-sized avatar
😶‍🌫️
dead

kendofriendo kendofriendo

😶‍🌫️
dead
  • South Carolina
  • 11:08 (UTC -04:00)
View GitHub Profile
@amishmm
amishmm / ArchOracleCloud.md
Last active July 4, 2024 06:50
Install Arch Linux on Oracle Cloud (Free Tier)

Requirement

  • Console / Cloud Shell access (via https://cloud.oracle.com)
  • Go to the instance page and under Resources -> Console connection -> Launch Cloud Shell connection

Steps

  1. In Ubuntu OR any other Free tier Linux OS
# Download Alpine Linux and install it on disk
cd /
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
@ishad0w
ishad0w / oci_ubuntu_to_debian.multiarch.sh
Last active July 9, 2024 08:22
Debian 12 on Oracle Cloud (Free Tier) - (AMD64/ARM64)
#!/bin/bash
trap "exit" INT
echo -e "\nHost:"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'uname -a && arch && uptime && sudo touch /home/ubuntu/.hushlogin /root/.hushlogin'
echo -e "\nAdding temporary SSH-key for Ubuntu root user..."
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'sudo cat /home/ubuntu/.ssh/authorized_keys | sudo tee /root/.ssh/authorized_keys'
@bdeshi
bdeshi / lemmy.yml
Created April 24, 2022 12:19
lemmy caprover oneclick app
captainVersion: 4
services:
$$cap_appname-db:
image: postgres:12-alpine
environment:
POSTGRES_USER: $$cap_db_username
POSTGRES_PASSWORD: $$cap_db_password
POSTGRES_DB: $$cap_db_database
@miliarch
miliarch / install-arch-in-virtual-machine.md
Last active July 7, 2024 23:42
Install Arch Linux in a Virtual Machine
@spacekookie
spacekookie / fonts.txt
Last active November 18, 2023 20:10
A list of fonts for Arch linux (including AUR) that cover most alphabets and scripts
adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts \
ttf-ubraille adobe-source-han-sans-cn-fonts adobe-source-han-sans-tw-fonts \
adobe-source-han-serif-cn-fonts adobe-source-han-serif-tw-fonts ttf-hannom \
adobe-source-han-sans-jp-fonts adobe-source-han-sans-kr-fonts ttf-hannom \
ttf-indic-otf ttf-freebanglafont ttf-khmer persian-fonts ttf-mgopen ttf-amiri \
ttf-sil-lateef ttf-mgopen culmus fonts-tlwg ttf-tibetan-machine
@bueckl
bueckl / wget
Last active October 11, 2023 08:05
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@victorwhy
victorwhy / gist:45bb5637cd3e7e879ace
Last active February 21, 2023 11:17
How Sinatra routes PUT/PATCH and DELETE

HTML and Sinatra really only support the GET and the POST methods. In order to be able to use the PUT and DELETE methods in Sinatra, you kind of have to "trick" the form to go to the right place. Then you can name the routes the proper way - otherwise you can only really work with GET and POST.

I used the Craiglist Jr challenge for some examples. Let's look at a quick example of a POST form/method/route- in this case, we're creating a new Craigslist article:

POST form and corresponding route:

<form action="/article/new" method="post">
  --------------------------------
  YOUR FORM FIELDS HERE
@wnoguchi
wnoguchi / rbenv-install.sh
Created October 22, 2013 11:34
rbenv and rails environement one shot install script.
#!/bin/bash
#=====================================
# Settings Here
#=====================================
# Platform
PLATFORM=Ubuntu
#PLATFORM="CentOS"
# Rails Application Name
@jonpugh
jonpugh / git-pull-recursive.rb
Last active October 20, 2021 03:20
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside. Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
# For use in Chef:
# Adds a command: git-pull-recursive
file "/usr/local/bin/git-pull-recursive" do
owner "root"
group "root"
mode "0755"
action :create
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;'
end