Skip to content

Instantly share code, notes, and snippets.

View bitmori's full-sized avatar
🧭

新房 森人 bitmori

🧭
  • 未満工房
  • Da'at
View GitHub Profile
@killshot13
killshot13 / settings.jsonc
Last active December 25, 2024 05:11
vscode-colorized-brackets
{
// Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.
"editor.bracketPairColorization.enabled": true,
// Controls whether the editor should render indent guides.
"editor.guides.indentation": true,
// Controls whether bracket pair guides are enabled or not.
// - true: Enables bracket pair guides.
// - active: Enables bracket pair guides only for the active bracket pair.
// - false: Disables bracket pair guides.
"editor.guides.bracketPairs": "active",
@alexcasalboni
alexcasalboni / aws-lambda-static-type-checker.md
Last active May 22, 2023 07:31
AWS Lambda Static Type Checker Example (Python3)

How to use Python3 Type Hints in AWS Lambda

TL;DR

Static Type Checkers help you find simple (but subtle) bugs in your Python code. Check out lambda_types.py and incrementally improve your code base and development/debugging experience with type hints.

Your Lambda Function code will go from this:

@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs
@virasio
virasio / Singleton.h
Last active December 2, 2019 03:42
Singleton (Objective-C with ARC)
@interface MySingleton : NSObject
// ...
+ (instancetype) sharedInstance;
+ (instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
- (instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
+ (instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));
@teohm
teohm / learn-dynamodb.md
Last active July 31, 2021 09:55
personal reading notes about DynamoDB tips & gotcahs

Disclaimer: I'm super new to DynamoDB, so if you found I wrote something incorrect or stupid, just kindly send me a comment :)


Learn DynamoDB

  • database -> tables -> items -> attributes
  • db = a collection of tables
@thiagozs
thiagozs / messagepack.md
Created September 25, 2013 13:30
MessagePack overview a tutorial
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@ansjsun
ansjsun / gist:5791394
Created June 16, 2013 08:31
字符串gzip压缩后通过字符串传输数据demo
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
public class StringZip {
public static void main(String[] args) throws Exception {
StringBuilder value = new StringBuilder() ;
-- Primer on representing non-printable characters in Lua code
function assert_equal(a, b)
if a ~= b then
error(a .. ' is not equal to ' .. b)
end
end
-- Escape sequences in string use decimal character codes, i.e.
assert_equal('\97\98\99', 'abc')
@lucasdavila
lucasdavila / 1_ubuntu_terminal_command
Last active August 22, 2024 16:26
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh