Skip to content

Instantly share code, notes, and snippets.

View sshravan's full-sized avatar

Shravan Srinivasan sshravan

View GitHub Profile

desktop

Running with -curve=bls12-381

DEBU[0000] Order of field "in the exponent" F_r:     52435875175126190479447740508185965837690552500527637822603658699938581184513 
DEBU[0000] Order of multiplicative subgroup G_{r-1}: 52435875175126190479447740508185965837690552500527637822603658699938581184512 
DEBU[0000] Selected curve: bls12-381 (5)                
DEBU[0000] GetMaxOpUnitSize() = 6                       
DEBU[0000] GetFrUnitSize() = 4                          
goos: linux

Opera + Widevine + Netflix

  • Here is a hack to watch Netflix on Opera with Widevine DRM support.
  • Download official Opera DEB and, weirdly, remove it after installation.
     cd ~/Downloads
     sudo dpkg -i opera-stable_*.deb
     sudo apt-get autoremove opera-stable
     sudo rm -rf /usr/lib/x86_64-linux-gnu/opera

gdb self signed certificates

# https://gist.github.com/hlissner/898b7dfc0a3b63824a70e15cd0180154
# https://sourceware.org/gdb/wiki/PermissionsDarwin
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
// "command": "sh",
// "type": "shell",
// "args": ["-c"],
"options": {
"cwd": "${workspaceRoot}/build"
},
@sshravan
sshravan / Makefile
Created November 5, 2018 20:08
My sample Makefile
CXX=g++
CXXFLAGS=-g -std=c++11 -Wall -Wextra -Wcast-align -pedantic
LDFLAGS :=
SRC_DIR := src
OBJ_DIR := bin
SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC_FILES))
# https://stackoverflow.com/questions/390250/elegant-ways-to-support-equivalence-equality-in-python-classes
class Number:
def __init__(self, number):
self.number = number
def __eq__(self, other):
"""Overrides the default implementation"""
if isinstance(other, Number):
@sshravan
sshravan / .screenrc
Last active July 10, 2019 20:26 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# Forked from https://gist.github.com/joaopizani/2718397
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 200000
# no welcome message