Skip to content

Instantly share code, notes, and snippets.

View jloiola's full-sized avatar
:octocat:
Focusing

Jeffrey Loiola jloiola

:octocat:
Focusing
View GitHub Profile
@jloiola
jloiola / hidden_gems_using_players.md
Created April 6, 2022 20:54 — forked from woctezuma/hidden_gems_using_players.md
Hidden Gems, using players total (forever) as a popularity measure

This post contains a ranking of Steam games, based on a score intended to favor "hidden gems". A "hidden gem" is defined as a high-quality game (hence the "gem") which only got little attention (hence "hidden"). Therefore, the score of a game is defined as the product of a quality measure (its Wilson score) and a decreasing function of a popularity measure (its players total forever). The quality measure comes from SteamDB and the popularity measure comes from SteamSpy API. Finally, here is a reference to the NeoGAF post explaining the method, and the NeoGAF post explaining the idea behind the optimization of the only free parameter. The Python source code can be found on Github.

Reproducibility

To reproduce the results, use data downloaded betwe

@jloiola
jloiola / hidden_gems_using_players.md
Created April 6, 2022 20:54 — forked from woctezuma/hidden_gems_using_players.md
Hidden Gems, using players total (forever) as a popularity measure

This post contains a ranking of Steam games, based on a score intended to favor "hidden gems". A "hidden gem" is defined as a high-quality game (hence the "gem") which only got little attention (hence "hidden"). Therefore, the score of a game is defined as the product of a quality measure (its Wilson score) and a decreasing function of a popularity measure (its players total forever). The quality measure comes from SteamDB and the popularity measure comes from SteamSpy API. Finally, here is a reference to the NeoGAF post explaining the method, and the NeoGAF post explaining the idea behind the optimization of the only free parameter. The Python source code can be found on Github.

Reproducibility

To reproduce the results, use data downloaded betwe

@jloiola
jloiola / sfprefix.php
Created June 18, 2020 16:22 — forked from Synchro/sfprefix.php
Salesforce prefix to entity name mapping
<?php
/**
* Mapping array for salesforce ID prefixes to entity name & description.
* @link http://www.fishofprey.com/2011/09/obscure-salesforce-object-key-prefixes.html
* Convert copy/paste from that page with:
* Search: '^([a-zA-Z0-9]+)[ \t]+(\w+)[ \t]*(.*)$'
* Replace: ' '$1' => ['$2', '$3'],'
* @author Marcus Bointon <[email protected]>
*/
@jloiola
jloiola / useThunk.js
Created January 27, 2020 18:23 — forked from venil7/useThunk.js
Using thunk with React hooks
const useThunk = (reducer, initState) => {
const [state, dispatch] = useReducer(reducer, initState);
const thunkDispatch = action => {
if (typeof action === "function") {
action(dispatch, () => state);
} else {
dispatch(action);
}
};
return [state, thunkDispatch];
@jloiola
jloiola / aws-ship-it-stack.yml
Created January 25, 2019 23:31 — forked from TheDeveloper/aws-ship-it-stack.yml
App deploy stack with ECS, CodeBuild & CodePipeline.
# App ship-it stack with ECS, CodeBuild & CodePipeline.
#
# aws cloudformation deploy \
# --stack-name myapp-prod \
# --template-file ./aws-ship-it-stack.yaml \
# --parameter-overrides \
# KeyName=<KEY_NAME> \
# GitHubAuthToken=<ACCESS_TOKEN> \
# RepoOwner=<OWNER_NAME> \
# RepoName=<REPO_NAME> \
@jloiola
jloiola / file.js
Created December 25, 2017 08:57 — forked from creationix/file.js
NodeJS File object
var File = {
open: function (path, mode) {
var fd, queue, enc;
enc = 'utf8';
queue = [];
// This is called after each step in the queue finishes, when the queue is empty, then we close the file descriptor.
function run_next() {
if (queue.length > 0) {
@jloiola
jloiola / highsierra_bootable.sh
Created October 24, 2017 05:43 — forked from agentsim/highsierra_bootable.sh
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@jloiola
jloiola / converter.py
Created March 31, 2017 05:05 — forked from Kronopath/converter.py
WeChat audio converter script. See http://kronopath.net/blog/extracting-audio-messages-from-wechat/ for more details.
# WeChat aud file converter to wav files
# Dependencies:
# SILK audio codec decoder (available at https://github.com/gaozehua/SILKCodec)
# ffmpeg
#
# By Gabriel B. Nunes ([email protected])
# Adapted from another script by Nicodemo Gawronski ([email protected])
#
import os, argparse, subprocess
@jloiola
jloiola / index.ios.js
Created October 31, 2016 05:08 — forked from staltz/index.ios.js
Experiment with Cycle.js and React Native
'use strict';
var React = require('react-native');
var Cycle = require('cyclejs');
var {Rx, h} = Cycle;
var createExperimentalIOSRenderer = require('./src/ios-renderer.ios.js');
var {StyleSheet, Text, TextInput, View} = React;
var styles = StyleSheet.create({
container: {
@jloiola
jloiola / README.md
Created October 25, 2016 04:28 — forked from boopathi/README.md
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,