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 / Dockerfile
Last active May 3, 2019 16:15
ShellSample.ipynb
FROM jupyter/scipy-notebook:cf6258237ff9
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
USER root
RUN apt update && apt-get -y install sudo net-tools
@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
@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');
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bot
spec:
selector:
matchLabels:
app: clara.discordapp
tier: frontend
@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;
@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 / 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 / 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 / .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"
#!/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