Skip to content

Instantly share code, notes, and snippets.

View Fs02's full-sized avatar

Surya Asriadie Fs02

View GitHub Profile
@Fs02
Fs02 / yuzu.sh
Last active October 22, 2024 09:04
Emudeck yuzu pineapleEA
#!/bin/bash
emuName="yuzu" #parameterize me
useEAifFound="true" # set to false to simply use the newest file found
emufolder="$HOME/Applications" # has to be applications for ES-DE to find it
emuDontUpdate="$HOME/emudeck/${emuName}.noupdate"
Yuzu_emuPath="$HOME/Applications/yuzu.AppImage"
YuzuEA_emuPath="$HOME/Applications/yuzu-ea.AppImage"
YuzuEA_tokenFile="$HOME/emudeck/yuzu-ea-token.txt"
YuzuEA_lastVerFile="$HOME/emudeck/yuzu-ea.ver"
Yuzu_lastVerFile="$HOME/emudeck/yuzu.ver"
@Fs02
Fs02 / profiling-go.md
Created April 19, 2018 07:32
Profiling in Go

https://bieker.ninja/go/2015/01/22/profiling-go.html

<ourProgram>.test -test.cpuprofile=cpu.prof
go tool pprof <outProgram>.test cpu.prof
Welcome to pprof!  For help, type 'help'.
(pprof) top10
Total: 1256 samples
    1074  85.5%  85.5%     1074  85.5% code.google.com/p/go.crypto/blowfish.encryptBlock
 90 7.2% 92.7% 90 7.2% runtime.usleep
@Fs02
Fs02 / test_random.cpp
Created February 2, 2017 19:02
Test Levy Random
// Example program
#include <iostream>
#include <string>
#include <random>
#include <chrono>
// https://www.quantstart.com/articles/Statistical-Distributions-in-C
double inv_cdf(const double& quantile) {
// This is the Beasley-Springer-Moro algorithm which can
// be found in Glasserman [2004]. We won't go into the
@Fs02
Fs02 / map.csv
Last active April 13, 2016 18:38
Emergency Facility Location Problem
3 6 4 3 3 1 6 6 9 2 1 10 10 10 7 2 3 7 6 2 8 0 7 3 5 9
6 1 0 7 3 3 4 0 10 3 6 4 10 9 9 1 2 8 2 6 10 0 2 3 0 1
0 9 5 6 0 6 8 4 9 4 2 4 10 2 1 3 5 7 7 9 5 2 6 8 3 5
0 7 2 4 2 2 10 1 0 2 9 2 9 5 10 7 4 10 1 10 3 7 10 9 2 0
2 7 7 10 7 1 6 5 0 7 4 9 4 6 7 4 8 6 1 3 10 6 9 4 4 3
9 8 2 2 7 9 3 2 8 5 10 2 8 7 2 5 7 9 2 10 0 8 9 9 10 8
8 1 4 9 3 4 10 6 3 6 6 7 9 5 4 8 7 4 5 5 10 2 2 7 2 4
3 0 6 1 4 10 7 0 1 7 10 4 0 5 2 0 9 9 6 3 3 7 9 10 3 6
8 8 4 3 10 4 5 0 10 10 8 8 5 5 3 5 8 4 5 7 6 2 9 4 6 4
10 4 5 1 4 7 4 10 6 2 6 9 1 4 9 9 10 8 5 7 4 6 4 1 10 9
@Fs02
Fs02 / test.js
Created February 22, 2016 12:43
/*!
* ngImgCropExtended v0.5.0
* https://github.com/CrackerakiUA/ngImgCropExtended/
*
* Copyright (c) 2016 undefined
* License: MIT
*
* Generated at Monday, February 22nd, 2016, 2:21:31 AM
*/
(function() {
.reset-this {
animation : none;
animation-delay : 0;
animation-direction : normal;
animation-duration : 0;
animation-fill-mode : none;
animation-iteration-count : 1;
animation-name : none;
animation-play-state : running;
animation-timing-function : ease;
@Fs02
Fs02 / fog-riakcs-storage.rb
Last active August 29, 2015 14:22
sample configuration for riak cs in fog
Fog::Storage.new(
:provider => "AWS",
:aws_access_key_id => "ACCESS_KEY",
:aws_secret_access_key => "SECRET_KEY",
:aws_signature_version => 2,
:scheme => "http",
connection_options: {
proxy: "RIAK_CS_HOST",
}
)
@Fs02
Fs02 / TimeSince.coffe
Created January 24, 2015 07:58
Twitter Style time since timer
# Usage => Write all your timer text in format :
# <span id="timer" timeStamp="<timeStamp>"></span>
# And it'll be updated automatically
# Get elapsed time since
timeSince = (timeStamp) ->
now = new Date()
past = new Date(timeStamp)
secondsPast = (now.getTime() - past.getTime()) / 1000
if (secondsPast < 10)
@Fs02
Fs02 / Multilist.cpp
Last active December 25, 2015 14:49
Multilist
#include "multilist.hpp"
bool Multilist::isEmpty(const Multilist &list)
{
return list.first == nullptr;
}
bool Multilist::isEmpty(const Childlist &list)
{
return list.first == nullptr;
@Fs02
Fs02 / DoubleList.cpp
Last active December 24, 2015 20:29
private
#include "DoubleList.hpp"
#include <iostream>
#include <string.h>
DoubleList::List::~List()
{
if (listEmpty(this))
return;