Skip to content

Instantly share code, notes, and snippets.

View classicvalues's full-sized avatar
🥇
Automating Python! Working Chatbot @ gemini-chatbot-mocha-three.vercel.app

Classic Values classicvalues

🥇
Automating Python! Working Chatbot @ gemini-chatbot-mocha-three.vercel.app
View GitHub Profile
@classicvalues
classicvalues / sources.list
Last active September 15, 2023 00:34 — forked from hakerdefo/sources.list
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb https://mirrors.mit.edu/ubuntu/ jammy restricted main multiverse universe
# deb https://mirrors.mit.edu/ubuntu/ jammy main
# deb https://mirrors.mit.edu/ubuntu/ jammy multiverse
# deb https://mirrors.mit.edu/ubuntu/ jammy restricted
# deb https://mirrors.mit.edu/ubuntu/ jammy universe
# deb-src https://mirrors.mit.edu/ubuntu/ jammy restricted main multiverse universe
# deb-src https://mirrors.mit.edu/ubuntu/ jammy main
# deb-src https://mirrors.mit.edu/ubuntu/ jammy multiverse
# deb-src https://mirrors.mit.edu/ubuntu/ jammy restricted
# deb-src https://mirrors.mit.edu/ubuntu/ jammy universe
/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:[email protected]
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
@classicvalues
classicvalues / aircraft_type_fuel_consumption_rate.json
Created July 5, 2023 09:08 — forked from Jxck-S/aircraft_type_fuel_consumption_rate.json
Fuel consumption rates by ICAO type of aircraft
{
"EA50": {
"name": "Eclipse 550",
"galph": 76,
"category": "VLJ"
},
"LJ31": {
"name": "Learjet 31",
"galph": 202,
"category": "Light"
@classicvalues
classicvalues / pg-pong.py
Created October 5, 2022 22:18 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@classicvalues
classicvalues / start-vpn.sh
Created August 28, 2022 02:25 — forked from kordless/start-vpn.sh
VPN Server for Google Cloud
#!/bin/bash
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
SERVER_NAME=vpn-$NEW_UUID
gcloud compute instances create $SERVER_NAME \
--machine-type "n1-standard-1" \
--image-family ubuntu-1604-lts \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "20" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "$NEW_UUID" \
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@classicvalues
classicvalues / gist:afe04f33cedb2642335aa49c41bb19ea
Created April 16, 2022 16:24 — forked from berlinbrown/gist:4588286
A web crawler in honor of Aaron Swartz. This is a basic crawler written in C++ (on Linux), compiled with Eclipse IDE. Uses boost_regex, lib4cxx
//============================================================================
// Name : OctaneCrawler.cpp
// Author : Berlin Brown (berlin dot brown at gmail.com)
// Version :
// Copyright : Copyright Berlin Brown 2012-2013
// License : BSD
// Description : This is the simplest possible web-crawler in C++
// Uses boost_regex and boost_algorithm
// Simplest web-crawler in honor of Aaron Swartz
// More Info : http://code.google.com/p/octane-crawler/
//#define run
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@classicvalues
classicvalues / Chromebook_setup.md
Created February 5, 2022 19:05 — forked from rachelmyers/Chromebook_setup.md
How I set up my Chromebooks' dev environment

Chromebook Setup Options

Option 1: Stay in Chrome OS

If you're writing bare-bones javascript for the browser, creating Chrome Apps and Extensions, or using remote coding apps like cloud9, Koding, or Nitrous, you may not need to install Ubuntu. Some tutorials can be done entirely within the browser. The tradeoff is that you won't have a full-featured command line, and you may hit a point where you can't install something that you need.

To start coding within Chrome OS, install Text or Caret as a text editor. (Text stores files in Google Docs and Caret stores the files locally on your machine, which may help you choose.) After that, you're good to go, since Chromebooks come with a browser installed.

Optio

@classicvalues
classicvalues / gist:05992e358c721843bfe113eb8c913f3e
Created February 5, 2022 19:03 — forked from ra/gist:894523
crosh commands, limited shell on Cr-48
crosh> help
enterprise_ca_approve [--allow-self-signed] <url>
Approve an enterprise certificate authority. The <url> option should be
an http or https url to your enterprise Certificate Authority in PEM
format. This CA will be used to validate the signature of an enterprise
policy extension.
If the --allow-self-signed option is provided, then you may provide a self
signed CA. Use this only if you are certain of the source of the CA.