Skip to content

Instantly share code, notes, and snippets.

View tvararu's full-sized avatar

Theodor Vararu tvararu

View GitHub Profile
@tvararu
tvararu / styles.less
Last active August 29, 2015 13:57
Atom Terminal Spacegray Base16 Dark
/* Add these in styles.less */
.terminal {
background-color: #2b303b;
.cursor {
background-color: #c0c5ce;
}
.color-0 {
color: #c0c5ce;
@tvararu
tvararu / ffmpeg_compress.rb
Last active August 29, 2015 13:57
Compresses everything in a folder with ffmpeg using some arbitrary parameters. Outputs to a different folder. 85% savings in my experience, with no major loss in quality.
# How to run:
#
# $ cd ~/folder/that/contains/videos/in/original
# $ cd ..
# $ ls original/
# video1.mp4 video2.mp4
#
# $ ruby ffmpeg_compress.rb
# $ ls compressed/
# video1.mp4 video2.mp4

Lab 1

Part A

Task 2

Logging into my system via my personal laptop, which is running the Mac OS X operating system, was actually more eventful than expected.

@tvararu
tvararu / cn.md
Last active August 29, 2015 14:16
Computer Networks 2015/03/05
  1. Signal Transmission
  2. Network Benefiting
  3. WAN Technology
  4. Network topologies
  5. Network Protocols and Network reference model
  6. Roles of computers on the network

7.8. Network Services

9.10. Router and routing

// Print out all the prime numbers from 1 to 100.
const N = 100
const range = (k) => Array.from(Array(k).keys())
const multiples = (i, max) => range(Math.ceil(max / i - 1)).map((k) => i * (k + 1))
const sieve = range(N)
.reduce((s, i) => {
if (i === 0) { s[i] = false }

Keybase proof

I hereby claim:

  • I am tvararu on github.
  • I am tvararu (https://keybase.io/tvararu) on keybase.
  • I have a public key ASCM1ftmjNNDi03F0cuZ1oUPjr1H03eT4TF9ZlXPUIv9Ago

To claim this, I am signing this object:

@tvararu
tvararu / standard-prettier.js
Last active February 17, 2017 15:26
standard-formatter-vs-prettier
foo({ num: 3 }, 1, 2)
foo({ num: 3 }, 1, 2)
foo({ num: 3 }, 1, 2)
function fuzzysearch (needle, haystack) {
var hlen = haystack.length
var nlen = needle.length
if (nlen > hlen) {
return false
}
if (nlen === hlen) {
return needle === haystack
}
outer: for (var i = 0, j = 0; i < nlen; i++) {
@tvararu
tvararu / sierra-hackintosh-z170-a.md
Created May 21, 2017 11:04 — forked from unsalted/sierra-hackintosh-z170-a.md
Sierra 10.12.3 Hackintosh | Asus z170-A, Intel i5 6500, MSI GTX 960 OC, GTX1070(Dormant)

Sierra 10.12.3 Hackintosh

This is my build documentation for an ASUS Z170-A setup with an NVIDIA GTX960 and the Intel i5 6500, most of this came from Storks asus rog maximus build, his audio instructions didn't work for me so it differs substantially there. This build also doesn't have NVRAM. Nearest I can tell everything is running as expected, including all USB and audio ports.

Build

  • Asus Z170-A
  • Intel Core i5-6500
  • Crucial Ballistix Sport LT 32GB (2 x 16GB) DDR4-2400 Memory
  • MSI GeForce GTX 960 4GB Installed in slot 1!
// How to run:
// 1. Change PATH_TO_GRAPH
// 2. Run `node graph2tsv.js`
const fs = require('fs')
const PATH_TO_GRAPH = './location-etd.json'
const PATH_TO_TSV = PATH_TO_GRAPH.replace('.json', '.tsv')
const graph = require(PATH_TO_GRAPH)