sudo pacman -S archlinux-keyring
source: https://www.ostechnix.com/fix-invalid-corrupted-package-pgp-signature-error-arch-linux/
"""Provides a rule that outputs a monolithic static library.""" | |
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") | |
TOOLS_CPP_REPO = "@bazel_tools" | |
def _cc_static_library_impl(ctx): | |
output_lib = ctx.actions.declare_file("{}.a".format(ctx.attr.name)) | |
output_flags = ctx.actions.declare_file("{}.link".format(ctx.attr.name)) |
$ cat WORKSPACE | |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
http_archive( | |
name = "io_tweag_rules_nixpkgs", | |
urls = ["https://github.com/tweag/rules_nixpkgs/archive/v0.5.2.tar.gz"], | |
strip_prefix = "rules_nixpkgs-0.5.2", | |
sha256 = "5a384daa57b49abf9f0b672852f1a66a3c52aecf9d4d2ac64f6de0fd307690c8", | |
) |
sudo pacman -S archlinux-keyring
source: https://www.ostechnix.com/fix-invalid-corrupted-package-pgp-signature-error-arch-linux/
#!/bin/bash | |
set -e | |
mkdir clangd | |
cd clangd/ | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm | |
cd llvm/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang |
yum install gcc make ncurses-devel giflib-devel libjpeg-devel libtiff-devel | |
wget wget http://ftp.gnu.org/gnu/emacs/emacs-25.2.tar.xz | |
tar xJf emacs-25.2.tar.xz | |
cd emacs-25.2 | |
./configure --without-x --without-selinux | |
make && sudo make install |
Short link to this page: caseywatts.com/quicktime
Other gists & tricks: http://caseywatts.com/gists-and-tricks
Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book
Scenario: You want to talk with someone over google hangouts (like for a user study), and you want to record BOTH:
def truncate_db(engine): | |
# delete all table data (but keep tables) | |
# we do cleanup before test 'cause if previous test errored, | |
# DB can contain dust | |
meta = MetaData(bind=engine, reflect=True) | |
con = engine.connect() | |
trans = con.begin() | |
con.execute('SET FOREIGN_KEY_CHECKS = 0;') | |
for table in meta.sorted_tables: | |
con.execute(table.delete()) |
# Install tmux 2.8 on Centos | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# cd src | |
cd /usr/local/src | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz |
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |