Skip to content

Instantly share code, notes, and snippets.

@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
@fnky
fnky / ANSI.md
Last active April 28, 2024 10:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 10:36
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 28, 2024 10:33
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@maxim
maxim / gh-dl-release
Last active April 28, 2024 10:30
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#