Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / linux-setup.sh
Last active April 28, 2024 10:57
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@jmndao
jmndao / firebaseAntdFileUploader.js
Last active April 28, 2024 10:56
Create custom image request from firebase using Antd library.
// Note: this is a combo between react-antd and firebase (storage)
// - How you can add your task progress bar to the antd-progress
/* Action */
const firebaseUpload = ({ onSuccess, onProgress, onError, file }) => (dispatch) => {
const storageRef = storage.ref(`portfolio/${file.name}`);
const task = storageRef.put(file);
@ptMcGit
ptMcGit / cue_for_devops.md
Last active April 28, 2024 10:54
CUE for DevOps

CUE for DevOps

Overview

This is a tutorial that uses a toy infrastructure project to highlight some of CUE's features and show how it can be used to simplify and manage infrastructure. Go to Tutorial if you want to skip the introductory stuff.

What is CUE?

From cuelang.org:

@kimus
kimus / cx_oracle.md
Last active April 28, 2024 10:54
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@karlicoss
karlicoss / init.el
Created September 29, 2019 10:28
Snipped for org-mode agenda to show presence of notes
(with-eval-after-load 'org-agenda
(defun my/org-has-children ()
(if (save-excursion (org-goto-first-child)) "" " ")
)
(add-to-list 'org-agenda-prefix-format '(
agenda . "%i%-3:(my/org-has-children) %-12:c%?-12t% s "
))
)
; Result:
@baconcheese113
baconcheese113 / SIM7000_HTTPS_Requests_Bible.md
Last active April 28, 2024 10:46
HTTPS with SIMCOM modems has been a bit of a nightmare, this should help you avoid going through that yourself

"The fear of the AT Command is the beginning of wisdom

and the knowledge of the TLS handshake is understanding."

- Proverbs 9:10

This gist should help you troubleshoot your requests, leave a comment and star if it works (or doesn't) for you and see this thread for more background.

Uploading a certificate to the modem IS NOT REQUIRED TO USE HTTPS unless you're trying to host a domain from the modem

Here's the manual

@sighingnow
sighingnow / Makefile
Last active April 28, 2024 10:42
Detect operating system in Makefile.
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
@umrashrf
umrashrf / aws_ses.bash
Created July 26, 2016 19:05
Amazon AWS CLI - SES SEND EMAIL
sudo pip install awscli
aws configure
aws ses send-email \
--from "john@gmail.com" \
--destination "ToAddresses=mike@gmail.com" \
--message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}"
@mwufi
mwufi / install_docker_in_colab.sh
Last active April 28, 2024 10:40
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources