Skip to content

Instantly share code, notes, and snippets.

View pizzimenti's full-sized avatar

Bradley Pizzimenti pizzimenti

View GitHub Profile
@pizzimenti
pizzimenti / manjaro_dev_setup.sh
Created March 31, 2025 00:16
Manjaro Development Setup Script
#!/bin/zsh
# Setup development environment on a clean Manjaro Linux install
# Usage: sudo ./manjaro_dev_setup.sh
# Exit on error
set -e
# Check if running as root
if [ "$EUID" -ne 0 ]; then
@pizzimenti
pizzimenti / arch_setup.sh
Created July 18, 2023 23:33
Quick VM setup to Gnome
#!/bin/bash
set -e
echo "Updating system clock"
timedatectl set-ntp true
echo "Partitioning disk"
fdisk /dev/vda <<EOF
o
n
Shader "Flipping Normals" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Cull Off
@pizzimenti
pizzimenti / piCast.sh
Created October 14, 2018 22:48
Raspberry Pi Stream to Youtube in one line
raspivid -o - -t 0 -b 3000000 | avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://[insert Youtube RTMP broadcast addresss here]
@pizzimenti
pizzimenti / print.js
Created March 20, 2016 14:42
print to DOM from JS with HTML5
function print(message) {
var outputDiv = document.getElementById('output');
outputDiv.innerHTML = message;
}
@pizzimenti
pizzimenti / gist:57ec2db322d88b6346a2
Created February 29, 2016 23:41
Select form that autosubmits on change
<form action="/" method="post">
<div class="form-group">
<select id="stylist" name="stylist" class="form-control" type="text" onchange="this.form.submit();">
<option selected="true" disabled="disabled">Choose a Stylist</option>
#foreach($stylist in $stylists)
<option value="$stylist.getID()">$stylist.getName()</option>
#end
</select>
</div>
@pizzimenti
pizzimenti / gist:d2a2eba2e8fd5af259ea
Created February 23, 2016 06:26
For Each Loop in Java to get a Single String from a StringArrayList
String listString = "";
for (String s : stringArrayList)
{
listString += s + "\t";
}
return listString;
}
@pizzimenti
pizzimenti / .gitignore
Created February 17, 2016 10:54 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@pizzimenti
pizzimenti / gist:f48cade7a15d25b3b4ab
Last active February 15, 2016 22:35
calling a java function within a sibling function
public boolean isTriangle() {
if(mSide1 + mSide2 < mSide3 || mSide2 + mSide3 < mSide1 || mSide3 + mSide1 < mSide2) {
return false;
} else {
return true;
}
}
public boolean isIsosceles() {
if (this.isTriangle() == true && (mSide1 == mSide2 && mSide2 != mSide3 || mSide2 == mSide3 && mSide3 != mSide1 || mSide3 == mSide1 && mSide1 != mSide2)) {
return true;
@pizzimenti
pizzimenti / gist:fdb2983386383f3297f0
Last active February 15, 2016 14:43
Java while loop
String response;
boolean isNo;
do{
response = console.readLine("Do you understand do while loops? ");
isNo = response.equalsIgnoreCase("no");
} while (isNo);