Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
v-thomp4 / Measure response time with curl
Created March 14, 2018 08:14 — forked from blackymetal/Measure response time with curl
How to measure request/response time with curl
curl -w "@curl-format.txt" -o /dev/null -s http://www.aduanacol.com
@v-thomp4
v-thomp4 / read-access.sql
Created May 11, 2018 12:28 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@v-thomp4
v-thomp4 / docker-cleanup-resources.md
Created September 6, 2018 04:38 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@v-thomp4
v-thomp4 / clean-up-boot-partition-ubuntu.md
Created October 2, 2018 17:17 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@v-thomp4
v-thomp4 / install-cuda-10-bionic.sh
Last active December 19, 2019 09:10 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
# WARNING: These steps seem to not work anymore!
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@v-thomp4
v-thomp4 / aosp-101.md
Created March 11, 2021 08:38 — forked from tinntt/aosp-101.md
AOSP 101

There are 3 steps:

  • Setup & Download
  • Build
  • Flash

Before you start, please be calm in any situation :v.

Step 1, Setup & Download:

  • At least 250GB of free disk space to check out the code and an extra 150 GB to build it. If you conduct multiple builds, you need additional space.
  • You need repo tool to download the source:
@v-thomp4
v-thomp4 / gist:de5234e232d44bcdbd933a7b0f09cd9e
Last active December 28, 2022 09:42 — forked from opastorello/sublime text 4143 license key
sublime text 4143 license key
Download from the App Store an app called Hex Fiend it's free.
Open your Applications folder, find Sublime Text -> Show Package Contents -> Mac OS -> executable to change the hex in is: sublime_text
Edit that file with Hex Fiend
Find in Hex: 80 78 05 00 0f 94 c1
Replace with c6 40 05 01 48 85 c9
codesign --remove-signature Sublime\ Text.app/
Save