Skip to content

Instantly share code, notes, and snippets.

View flyfire's full-sized avatar
🎯
Focusing

flyfire flyfire

🎯
Focusing
View GitHub Profile
@flyfire
flyfire / ApiResponse.java
Created February 3, 2024 01:47 — forked from AkshayChordiya/ApiResponse.java
LiveData adapter for Retrofit
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.ArrayMap;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@flyfire
flyfire / git-ssh-error-fix.sh
Created January 30, 2024 10:31 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@flyfire
flyfire / BlankItemDecoration.kt
Created December 23, 2023 03:13 — forked from shawnlinboy/BlankItemDecoration.kt
An ItemDecoration implementation which provides functionality that add extra blank space between list items.
/*
* Copyright (C) 2019 Shen Lin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@flyfire
flyfire / Article.java
Created July 13, 2023 03:01 — forked from plastiv/Article.java
Retrofit multipart convertor
@MultipartBody
public class Article {
String author;
File photo;
}
@flyfire
flyfire / shake.xml
Created July 1, 2023 09:08 — forked from simon-heinen/shake.xml
A simple shake / wiggle animation for Android
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="70"
android:fromDegrees="-5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="5"
android:repeatMode="reverse"
@flyfire
flyfire / fileLoader.py
Created June 8, 2022 08:02 — forked from bootchk/fileLoader.py
A class for asynchronous url loading using Qt, PyQt
'''
Copyright 2014 Lloyd Konneker
Release under the GPLv3
'''
from PyQt5.QtCore import pyqtSignal as Signal
from PyQt5.QtCore import QObject, QByteArray, QUrl
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest
@flyfire
flyfire / kindleDown.js
Created June 6, 2022 07:47 — forked from yushiro/kindleDown.js
批量从亚马逊中国区下载kindle上购买的电子书
var curIndex = -1;
function callbackDown(){
if(curIndex >=0) $('input.hideItem_myx')[curIndex].click();
curIndex++;
$('input.hideItem_myx')[curIndex].click();
$('ul button.myx-button-text')[curIndex].click();
//触发下载popup
setTimeout(function(){$('.myx-popover-inner .transcludedContent_myx .contentDetails_myx #contentAction_download_myx').trigger('click');},1000);
setTimeout(function(){$('.dialog_myx .myx-button-primary').trigger('click');},2000);
@flyfire
flyfire / web-servers.md
Created June 5, 2022 15:07 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@flyfire
flyfire / custom_game_engines_small_study.md
Created June 5, 2022 10:04 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d