Skip to content

Instantly share code, notes, and snippets.

View robobluebird's full-sized avatar

Zachary Schroeder robobluebird

View GitHub Profile
@mansouryaacoubi
mansouryaacoubi / addwifi.sh
Last active June 17, 2022 08:27
Adds wifi to the wpa_supplicant file and reconfigures wpa_cli (Raspberry Pi Wifi)
#!/bin/bash
# @author Mansour Yaacoubi
# @filename addwifi.sh
# @usage sudo ./addwifi.sh "SSID" "WPA-Key"
# @task adds wifi to the wpa_supplicant file and reconfigures wpa_cli
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit 1
else
@runemadsen
runemadsen / app.rb
Created October 17, 2012 13:45
Sinatra File Upload
require 'sinatra'
get "/" do
erb :form
end
post '/save_image' do
@filename = params[:file][:filename]
file = params[:file][:tempfile]