Skip to content

Instantly share code, notes, and snippets.

@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:26
Springer made a bunch of books available for free, these were the direct links
@m5lil
m5lil / reset.sh
Last active April 25, 2024 06:24
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do
@josephspurrier
josephspurrier / values_pointers.go
Last active April 25, 2024 06:24
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@karpathy
karpathy / min-char-rnn.py
Last active April 25, 2024 06:24
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@matthewpick
matthewpick / aws_logging_util.py
Last active April 25, 2024 06:23
AWS Lambda universal logging formatter (retain aws_request_id in log output)
import logging
import os
def setup_logging_format(log_level=logging.INFO, override_existing_loggers=True):
"""
Logger formatter that works locally and in AWS lambda
:param log_level: Level of logging
:param override_existing_loggers: Flag for overriding the formatting of all existing loggers
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@pxwise
pxwise / nginx.conf
Last active April 25, 2024 06:20
HTML5 pushState nginx configuration
# HTML5 pushState nginx configuration
#
# @see: http://stackoverflow.com/a/30515169/1774183
#
# Server block for a client side app with directories:
#
# /
# /foo
# /foo/bar
# /foo/bar/baz
@joulgs
joulgs / terminal.txt
Last active April 25, 2024 06:16
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)