Skip to content

Instantly share code, notes, and snippets.

View 1egoman's full-sized avatar

Ryan Gaus 1egoman

View GitHub Profile
@tomwwright
tomwwright / gist:f88e2ddb344cf99f299935e1312da880
Last active September 3, 2024 06:20
Dell XPS 15 9560: Ubuntu 17.10 + Nvidia 384.90 + Nvidia Prime (No Bumblebee) https://medium.com/@tomwwright/better-battery-life-on-ubuntu-17-10-4588b7f72def
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
sudo dpkg -i *.deb
@alastairmccormack
alastairmccormack / widevinecdm.proto
Last active February 22, 2021 11:31
An incomplete reverse-engineer of the Widevine EME CDM request protobuf object.
// Used by https://github.com/use-sparingly/pywvpssh to automatically
// strip PSSH from MP4 files
package WidevineCDM;
message WvEmeRequest {
required int32 version = 1; // 1
//start rlen end
message Level1 { //0x02 1467 0x5BD
@1egoman
1egoman / keyring.json
Last active August 29, 2015 14:17
CSE Keyring
[
{
"pub_key": [
51959,
5
],
"name": "Justus Barczewski",
"email": "Linkkillsganon4@gmail.com"
},
{
@daxxog
daxxog / libspotify-fix-osx.sh
Created December 10, 2014 15:34
fix libspotify on osx "dyld: Library not loaded: /usr/local/opt/libspotify/lib/libspotify"
#!/bin/sh
ln -s /usr/local/opt/libspotify/lib/libspotify.dylib /usr/local/opt/libspotify/lib/libspotify
@curtismcmullan
curtismcmullan / setup_selenium.sh
Last active May 2, 2023 22:56
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@naholyr
naholyr / Makefile
Last active March 6, 2018 17:02
browserify-friendly Makefile
# Main entry point
SOURCE = src/app.js
# The dependencies (other than node_modules/**)
LIBS = $(shell ls src/lib/*.js src/components/*.js)
# The target
TARGET = build/app.js
# Compilation flags
@jmar777
jmar777 / debugging-node-elastic-beanstalk-woes
Created February 28, 2014 22:32
Debugging "Failed to run npm install. Snapshot logs for more details." on Elastic Beanstalk
First, we need to figure out what the actual error is. This is obviously frustrating given that the error message is intentionally truncating it.
1) SSH in to your node (various guides available for this if you're not already familiar with this).
2) Run this command (basically an Elastic Beanstalk wrapper command for npm install I found in a blog post [1]):
$ sudo /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install 2
3) Find the actual error message in the output from the npm install.
Once you know the error, it should hopefully be fairly obvious how to fix it. I've run into two different errors over the last couple days on Elastic Beanstalk:
The first was a dependency that was using the new "^X.Y.Z" version syntax, which is only supported in Node >= v0.10.26 (whereas Elastic Beanstalk only supports up to v0.10.21 as of today). The solution here was easy: hardcode a dependency version *prior* to when that dependency adopted to the new syntax.
@akb
akb / gist:1187817
Created September 2, 2011 02:38
pretty print a date in javascript
(function () {
return ['Jan.', 'Feb.', 'Mar.',
'Apr.', 'May', 'Jun.',
'Jul.', 'Aug.', 'Sep.',
'Oct.', 'Nov.', 'Dec.'][this.getMonth()] + " " +
(function (d) {
var s = d.toString(), l = s[s.length-1];
return s+(['st','nd','rd'][l-1] || 'th');
})(this.getDate()) + ", " +
this.getFullYear() + " " +