Skip to content

Instantly share code, notes, and snippets.

View veeara282's full-sized avatar

Evelyn veeara282

  • Looking for work
  • New York, NY
View GitHub Profile
@veeara282
veeara282 / photos.sh
Created September 24, 2015 06:26
The bash script I used to bulk download my yearbook photos.
#!/bin/sh
for i in `seq 1 15`;
do
wget "https://s3.amazonaws.com/iq-cache/A9X6594/gallery/1000349181/1200/05003423($i).jpg" -O $i.jpg
done
@veeara282
veeara282 / .gitignore
Last active April 9, 2016 13:36
Hacking Sessions
*~
*.o
a.out
@veeara282
veeara282 / spotify.sh
Created June 25, 2016 07:29
Spotify installation script for Linux
#!/bin/sh
# 1. Add the Spotify repository signing key to be able to verify downloaded packages
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
# 2. Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
# 3. Update list of available packages
sudo apt-get update
@veeara282
veeara282 / Big Red Green.md
Created October 11, 2016 00:22
Ideas for a sustainable campus

My ideas for a more sustainable Cornell campus

Infrastructure

Water use

  • Shower meters -- coming to Donlon!
  • Dual-flush toilets

Waste treatment

Awkward question, but how much human waste does Cornell produce each semester?

@veeara282
veeara282 / heathens.js
Last active December 7, 2022 13:56
"Heathens" by Twenty One Pilots in JavaScript
/**
* Adapted from "Heathens" by Twenty One Pilots
* (C) Warner/Chappell Music, Inc.
*
* All original modifications are (C) Aidan Fitzgerald and licensed under the
* Creative Commons Attribution 4.0 International License.
* https://creativecommons.org/licenses/by/4.0
*/
function you() {
friends.forEach(function(friend) {
@veeara282
veeara282 / copyright-101.md
Last active November 7, 2016 06:42
Cornell Splash! - Intro to Copyright
@veeara282
veeara282 / snippet.py
Created January 7, 2017 20:10
this is a cool snippet
L = [x*x*x for x in range(10)]
for i in L:
print L
@veeara282
veeara282 / alt_subtract.c
Last active February 5, 2017 03:37
An alternative method for subtracting two 32-bit signed integers in a two's complement system.
/**
* Performs the subtraction p - q.
* This is an alternative method to simply computing p + (-q).
* TODO I'll prove why it works later.
*/
int alt_subtract(int p, int q) {
// First, take the ones' complement of the minuend
int p1 = ~p;
// Next, add the subtrahend
int sum = p1 + q;
@veeara282
veeara282 / Gender.java
Last active June 8, 2017 11:16
Mockup of an inclusive version of Attract
enum Gender {MALE, FEMALE, GENDERLESS}
@veeara282
veeara282 / BitSort.java
Created October 1, 2017 00:58
Sort a bit vector in O(n) time
import java.util.BitSet;
public class BitSort {
public BitSet sort(BitSet bits) {
// Count the number of ones: O(n)
int numOnes = bits.cardinality();
// Overwrite the array with the ones first followed by the zeros
bits.set(0, numOnes);