Skip to content

Instantly share code, notes, and snippets.

View sr229's full-sized avatar
:octocat:
GitHubは私の街です。 (๑・ω・๑)

Ayase Minori sr229

:octocat:
GitHubは私の街です。 (๑・ω・๑)
View GitHub Profile
@sr229
sr229 / install.sh
Last active September 6, 2019 01:08
USB Ethernet Configuration Script for Raspberry Pi Zero. Source: http://www.circuitbasics.com/raspberry-pi-zero-ethernet-gadget/
#!/bin/bash
# Installation Script for usb_ethserv
set -eo pipefail
CONF_URL="https://gist.github.com/sr229/6950ab77a7fb5a6b6fc0891a2a398229/raw/2578e785ab9617f6909799f757e0a9014db45f7a/usb_ethserv"
if [ -z $(command -v wget) ]; then
echo "Setup requires wget"
exit 0
fi
#!/bin/sh
# Create and switch to a temporary directory writeable by current user. See:
# https://www.tldp.org/LDP/abs/html/subshells.html
cd "$(mktemp -d)"
# Use a BASH "here document" to create an updater shell script file.
# See:
# https://www.tldp.org/LDP/abs/html/here-docs.html
# > outputs stdout to a file, overwriting any pre-existing file
# << takes input, directly from the script itself, till the second '_EOF_SCRIPT' marker, as stdin
@sr229
sr229 / .startEnv.vscode.sh
Created August 27, 2019 11:20
Silverblue delegate script for VSCode
#!/bin/sh
# Copyright 2019 (c) Ayane Satomi
# Public Domain
#
# Delegate Script for VSCode
# This makes sure VScode only runs in a Toolbox container.
# This only works with a default container.
FEDORA_DEFAULT_CONTAINER="fedora-toolbox-$(whoami)-30"
@sr229
sr229 / grade.cpp
Created August 26, 2019 16:41
CS-111: College Grade calculation
/* Copyright 2019 (c) Ralph Wilson Aguilar
* For CS-111
* Do not copy or redistribute without permission
*/
#include <iostream>
using namespace std;
// This is based on the Philippine College Grading System.
@sr229
sr229 / float.cpp
Last active August 21, 2019 11:27
CS-111: Floating Point Arithmetic
/*
* Copyright 2019 (c) Ralph Wilson Aguilar
* For CS-111
* Do not copy or redistribute without permission.
*/
#include <iostream>
#include <cmath>
using namespace std;
@sr229
sr229 / factorial.cpp
Last active November 3, 2022 12:11
Factorials in C++ (with Comments)
/**
* Copyright 2019 (c) Ralph Wilson Aguilar
* For CS-111
* Do not copy or redistribute without permission.
*/
#include <iostream>
int main ()
{
int factorial = 1, i, input;
@sr229
sr229 / 2-power-n.cpp
Created August 18, 2019 00:49
CS-111 files
/**
* Copyright 2019 (c) Ralph Wilson Aguilar
* For CS-111
* Do not copy or redistribute without permission.
*/
#include <iostream>
#include <cmath>
using namespace std;
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bot
spec:
selector:
matchLabels:
app: clara.discordapp
tier: frontend
@sr229
sr229 / filo-server.js
Created June 3, 2019 14:23
Skeleton implementation for Filo
/**
* Copyright 2019 (c) Kibo Hikari
* Licensed under MIT.
*
* Based on Google's Flywheel whitepaper
* If you want to read about it, see: https://ai.google/research/pubs/pub43447
*/
const http = require('http');
const httpsProxy = require('http-proxy');
@sr229
sr229 / play_store_enable.sh
Created May 11, 2019 10:26
A script to enable Play Store support, based from Reddit
#!/bin/sh
sudo cp /etc/chrome_dev.conf /usr/local/
sudo mount --bind /usr/local/chrome_dev.conf /etc/chrome_dev.conf
sudo echo "--arc-availability=officially-supported " >> /etc/chrome_dev.conf
sudo restart ui
exit 0