Skip to content

Instantly share code, notes, and snippets.

@irisjae
irisjae / eas-analytics
Last active August 2, 2023 11:22
EAS patches for offline
--- a/eas-cli/build/analytics/AnalyticsManager.js
+++ b/eas-cli/build/analytics/AnalyticsManager.js
@@ -91,31 +91,31 @@ exports.getAnalyticsEnabledAsync = getAnalyticsEnabledAsync;
* Create an instance of Analytics based on the user's analytics enabled preferences.
*/
async function createAnalyticsAsync() {
- // TODO: remove after some time
- const amplitudeEnabled = await UserSettings_1.default.getAsync(USER_SETTINGS_KEY_AMPLITUDE_ENABLED, null);
- if (amplitudeEnabled !== null) {
- await UserSettings_1.default.setAsync(USER_SETTINGS_KEY_ANALYTICS_ENABLED, amplitudeEnabled);
@irisjae
irisjae / deploy.js
Created June 19, 2019 03:59
deploy servers
var fs = require ('fs-extra')
var ws = require ('ws')
var http = require("http");
var http_proxy = require('http-proxy');
//var https = require('https');
var app = require ('./server')
app .listen (8888)
@irisjae
irisjae / adt.js
Last active August 22, 2018 10:06
Polyfilling algebraic data types for js
//first attempt
//requirements:
//- must be polyfillable
// aka can be used as a library (though always recommended to be compiled)
//- syntax must be friendly
var board_viewer = data ({
board_viewer: (board = board, questions = list (question), history = history) => board_viewer })
var list = a =>
data
({ nil: () => list (a)
@irisjae
irisjae / where.js
Last active October 30, 2018 16:57
Polyfilling declarative-style name binding for js
//first draft
var where = where_fn => where_fn ()
where ((
even = n =>
!! (n === 0)
? true
: odd (n - 1),
odd = n =>
!! (n === 0)
@irisjae
irisjae / drive.sh
Created July 7, 2018 04:24
odeke drive
sudo add-apt-repository ppa:twodopeshaggy/drive
sudo apt-get update
sudo apt-get install drive
cd ~
mkdir drive
cd drive
drive init
@irisjae
irisjae / lamp.sh
Last active July 9, 2018 09:41
Wordpress LAMP
function bare_install_lamp {
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
}
function install_lamp {
sudo apt-get update
bare_install_lamp
setup_apache
@irisjae
irisjae / mac-coreutils.sh
Last active July 7, 2018 04:26
mac gnu coreutils check
#!/usr/bin/env bash
[[ `uname` == 'Darwin' ]] && { [ -d "/usr/local/opt/coreutils/libexec/gnubin" ] || { echo "gnu coreutils not found"; exit 1; } && PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"; }
@irisjae
irisjae / what can you rely on?.md
Last active July 7, 2018 04:25
what (globals) can you count on in your js (environment)?