Skip to content

Instantly share code, notes, and snippets.

@dmontagu
dmontagu / build.py
Created September 4, 2019 07:12
CMake + Cython extension building with poetry
"""
Adapted from https://github.com/pybind/cmake_example
"""
import os
import platform
import re
import subprocess
import sys
import sysconfig
from distutils.version import LooseVersion
@norcalli
norcalli / yay-update-ignore-errors
Last active February 22, 2023 09:34
A wrapper script to run yay and incrementally build a list of packages to ignore if they error out.
#!/bin/sh
# Wrapper script around yay to try to ignore errors
# Copyright © 2019 Ashkan Kiani
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@fsteffek
fsteffek / hb_all_books_dl.js
Last active April 24, 2022 20:47 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books and md5sums
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
function getTitle() {
var re = /^Humble\ Book\ Bundle\:\ (.*)\ \(/g;
return re.exec(document.title)[1];
}
@bmaupin
bmaupin / install-old-firefox.sh
Last active December 15, 2022 16:17
Temporarily install old version of Firefox for testing
# Firefox 33 was the last version to support SSLv3 (https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/)
#firefox_version=33.0
# Firefox 51 was the last version to support NPAPI plugins (e.g. Java) (https://support.mozilla.org/en-US/kb/npapi-plugins)
#firefox_version=51.0
# Firefox 56 was the last version to support XPCOM- and XUL-based add-ons (https://blog.mozilla.org/addons/2016/11/23/add-ons-in-2017/)
#firefox_version=56.0
wget https://ftp.mozilla.org/pub/firefox/releases/$firefox_version/linux-x86_64/en-US/firefox-$firefox_version.tar.bz2
tar -xvf firefox-$firefox_version.tar.bz2
mv firefox firefox-$firefox_version
@0xjac
0xjac / private_fork.md
Last active May 6, 2024 13:25
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@bbengfort
bbengfort / nx2gt.py
Created June 26, 2016 12:01
Convert a networkx to graph-tool graph
import networkx as nx
import graph_tool as gt
def get_prop_type(value, key=None):
"""
Performs typing and value conversion for the graph_tool PropertyMap class.
If a key is provided, it also ensures the key is in a format that can be
@roachhd
roachhd / README.md
Last active May 4, 2024 08:07
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄