Skip to content

Instantly share code, notes, and snippets.

Avatar
Thinking about app architectures

moko256 moko256

Thinking about app architectures
View GitHub Profile
@moko256
moko256 / fizz_buzz_by_adding_myself.bat
Created Feb 11, 2022
CAUTION: This bat may become very large.
View fizz_buzz_by_adding_myself.bat
@echo off
set /a i=i+1
set /a m3=i%%3
set /a m5=i%%5
set /a m15=m3+m5
if %m15%==0 (
echo FizzBuzz
) else if %m5%==0 (
echo Buzz
) else if %m3%==0 (
View stw_functions_one_line.md

One-line code for Stormworks function component.

Python -> Stormworks function component

Note:

  • 0/0 seems to be 0.
  • These have some numerical errors.

(1 if x >= 0 else -1) if x != 0 else 0

@moko256
moko256 / optimization.patch
Last active Oct 26, 2019
ぼくのかんがえたさいきょうのtwitlatte最小化Patch
View optimization.patch
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build.gradle (date 1572095169000)
+++ build.gradle (date 1572095639197)
@@ -22,7 +22,7 @@
exoplayerVersion = '2.10.4'
glideVersion = '4.10.0'
@moko256
moko256 / twitlatte-beta-publisher.rb
Last active Jun 22, 2019
twitlatte-beta-publisher for Windows ("C:\Program Files\Git\git-bash.exe" upload.rb & PAUSE)
View twitlatte-beta-publisher.rb
#! /bin/sh
exec ruby -S -x "$0" "$@"
#! ruby
require 'highline/import'
require 'json'
require 'fileutils'
PATH_APP = "twitlatte/app/release"
PATH_JSON = "#{PATH_APP}/output.json"
@moko256
moko256 / [TEST ONLY] Trust all NON_SECURE certificate.patch
Created Dec 27, 2018
Patch for twitlatte : [TEST ONLY] Trust all NON-SECURE certificate
View [TEST ONLY] Trust all NON_SECURE certificate.patch
Index: app/src/main/java/com/github/moko256/twitlatte/net/OkHttpHolder.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/java/com/github/moko256/twitlatte/net/OkHttpHolder.kt (date 1545880602000)
+++ app/src/main/java/com/github/moko256/twitlatte/net/OkHttpHolder.kt (date 1545880740787)
@@ -30,5 +30,6 @@
.followSslRedirects(false)
.connectTimeout(20000, TimeUnit.MILLISECONDS)
@moko256
moko256 / Aタグだけで作った半加算器の様な何か.html
Created Feb 2, 2018
HTMLのAタグで作った半加算器のような何か
View Aタグだけで作った半加算器の様な何か.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Aタグだけで作った半加算器の様な何か</title>
</head>
<body>
<a name="00"><div>
<p>値:00</p>