Skip to content

Instantly share code, notes, and snippets.

View flameoftheforest's full-sized avatar
🤖
I believe! Help me with my unbelief!

Bryan Chong flameoftheforest

🤖
I believe! Help me with my unbelief!
  • Fujifilm
  • Sydney, NSW, Australia
View GitHub Profile
@flameoftheforest
flameoftheforest / main.dart
Created January 2, 2024 05:12
Modified ListWheelScrollView
//
// README
// + I do not claim any credits to the code
// + Please refer to the links to find the original codes
//
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
@flameoftheforest
flameoftheforest / fibo_test.rs
Last active April 20, 2023 06:22
Fibo in Rust
fn main() {
println!("{}", fib(5));
println!("{}", fib(9));
}
fn fib(n: i32) -> i32{
let mut v = vec![n];
loop {
v = v.iter().fold(vec![], |mut acc, _v| {
if *_v > 1 {
@flameoftheforest
flameoftheforest / save_bars.script.02.mq4
Created December 2, 2022 04:14
save_bars.script.02.mq4
//+------------------------------------------------------------------+
//| save_bars.script.mq4 |
//| Copyright 2022, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
@flameoftheforest
flameoftheforest / save_bars.script.01.mq4
Last active December 2, 2022 04:06
save_bars.script.01.mq4
//+------------------------------------------------------------------+
//| save_bars.script.mq4 |
//| Copyright 2022, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
@flameoftheforest
flameoftheforest / gist:bf5abd84bc711c85125105cc06eefbe7
Created October 27, 2021 01:03
restart docker daemon (tested on Debian)
#!/bin/bash
sudo systemctl restart docker
@flameoftheforest
flameoftheforest / start.the.express.server.js
Last active October 12, 2021 07:31
Async Start The ExpressJS Server Function - waits for the server to be ready before returning from function
const startTheExpressServer = async (expressApp, port, key, cert) => {
const https = require('https');
let server = null;
const promise = new Promise((resolve, _) => {
server = https.createServer({
key,
cert,
}, expressApp).listen(port, async () => {
@flameoftheforest
flameoftheforest / genPEM.sample.sh
Created July 5, 2018 23:15
Generating PEM using openssl on GitBash in Windows
#!/bin/bash
# https://stackoverflow.com/questions/34156938/openssl-hangs-during-pkcs12-export-with-loading-screen-into-random-state
# "In windows console there is some problem with terminal input/output so winpty can help if some software require unix teminal behavior."
#
# https://rietta.com/blog/2012/01/27/openssl-generating-rsa-key-from-command/
# generate private PEM file
winpty openssl genrsa -des3 -out try.private.pem 2048
# generate public PEM file
@flameoftheforest
flameoftheforest / Vagrantfile
Last active December 28, 2017 11:32
Vagrantfile for Tensorflow + Jupyter (numpy, scipy, sklearn, tensorboard)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# NOTE: Vagrant-VBGuest plugin needs to be installed.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant development environment requires a box.
config.vm.box = "ubuntu/xenial64"
@flameoftheforest
flameoftheforest / TestClass.cs
Last active July 21, 2023 09:35
MailGun Netcore Multipart-Form Data Example (with attachment handling)
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;