Skip to content

Instantly share code, notes, and snippets.

View h1u2i3's full-sized avatar
🌴
On vacation

xiaohui h1u2i3

🌴
On vacation
View GitHub Profile
@h1u2i3
h1u2i3 / Pine_Script_5_Mini_Reference.md
Created December 10, 2023 10:30 — forked from kaigouthro/Pine_Script_5_Mini_Reference.md
A minimal reference to pine script v5

Pine Mini-Reference for more information

Pine Script™ Operators

The following operators are available.

Operator Description
+ Adds two operands
@h1u2i3
h1u2i3 / svg-convert.sh
Created May 1, 2020 01:24 — forked from zolthan/svg-convert.sh
Convert SVG to PNG @2x @3x
#!/bin/bash
# I made this script to convert SVG icons for an iOS app into PNG.
# The script will create icons in 3 sizes for different screen DPIs.
find . -type f -name "*.svg" | while read f
do
echo '---'
FILENAME="${f%.*}"
echo $FILENAME
@h1u2i3
h1u2i3 / dump-restore
Created April 8, 2020 01:10 — forked from ricjcosme/dump-restore
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@h1u2i3
h1u2i3 / mysql2-mojave.md
Created January 27, 2019 17:09 — forked from fernandoaleman/mysql2-mojave.md
Install mysql2 on MacOS Mojave

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@h1u2i3
h1u2i3 / 100_base.conf
Created September 10, 2018 13:52 — forked from danackerson/100_base.conf
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@h1u2i3
h1u2i3 / redis.sh
Created March 2, 2016 08:53
a non-interactive version of the Redis install_server.sh file
#!/bin/sh
# Copyright 2011 Dvir Volk <dvirsk at gmail dot com>. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#