Skip to content

Instantly share code, notes, and snippets.

@hellricer
hellricer / devtools.py
Created May 29, 2019 09:39
ELinks hooks providing a framework for manipulating DOM
import os
import re
import subprocess
from bs4 import BeautifulSoup
import rules
def replacer(url, html):
new = html
reload(rules)
@bccho
bccho / __LOOKATME_make_docset.sh
Last active July 20, 2020 03:40
Make Plotly docset
# Tested only with python 2.7 but should work regardless
pip install numpy ipywidgets pandas matplotlib nose mock plotly
pip install sphinx doc2dash
ORIG_DIR=$PWD
cd /path/to/build/directory
git clone https://github.com/plotly/plotly.py plotly
VERSION=$(python -c "exec(open('plotly/version.py').read()); print(__version__)")
@llllllllll
llllllllll / constexpr_dict.h
Last active April 15, 2024 13:53
compile-time hashtable for C++17 which supports mixed dtype keys and values
#include <array>
#include <tuple>
#include <type_traits>
#include <utility>
namespace cdict {
template<char... cs>
using string = std::integer_sequence<char, cs...>;
@leonardo-m
leonardo-m / gist:6e9315a57fe9caa893472c2935e9d589
Last active June 19, 2024 05:43
A selection of 101 LINQ Samples converted to Rust
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3.
#![feature(ordering_chaining, step_by)]
fn main() {
// linq5: Where - Indexed
/*
//c#
public void Linq5()
{
@wsargent
wsargent / win10-dev.md
Last active August 7, 2024 18:20
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

@kblomqvist
kblomqvist / githook-astyle.sh
Last active September 9, 2022 13:04
Git pre-commit hook to check C/C++ source file format using astyle (Artistic Style)
#!/bin/bash
# Installation:
# cd my_gitproject
# wget -O pre-commit.sh http://tinyurl.com/mkovs45
# ln -s ../../pre-commit.sh .git/hooks/pre-commit
# chmod +x pre-commit.sh
OPTIONS="-A8 -t8 --lineend=linux"
RETURN=0