Instantly share code, notes, and snippets.
🎯
Focusing
年轻人,你的职责是平整土地,而非焦虑时光。你做三四月的事,在八九月自有答案。
- Shenzhen,China
- http://flyfire.github.io
- @SolarexCN
flyfire /ApiResponse.java
CreatedFebruary 3, 2024 01:47 — forked fromAkshayChordiya/ApiResponse.java
LiveData adapter for Retrofit This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
importandroid.support.annotation.NonNull; | |
importandroid.support.annotation.Nullable; | |
importandroid.support.v4.util.ArrayMap; | |
importjava.io.IOException; | |
importjava.util.Collections; | |
importjava.util.Map; | |
importjava.util.regex.Matcher; | |
importjava.util.regex.Pattern; |
flyfire /git-ssh-error-fix.sh
CreatedJanuary 30, 2024 10:31 — forked fromTamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could notread from remote repository. | |
$# This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$# but this might work |
flyfire /BlankItemDecoration.kt
CreatedDecember 23, 2023 03:13 — forked fromshawnlinboy/BlankItemDecoration.kt
An ItemDecoration implementation which provides functionality that add extra blank space between list items. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
/* | |
* 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 /Article.java
CreatedJuly 13, 2023 03:01 — forked fromplastiv/Article.java
Retrofit multipart convertor This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
@MultipartBody | |
publicclassArticle { | |
Stringauthor; | |
Filephoto; | |
} |
flyfire /shake.xml
CreatedJuly 1, 2023 09:08 — forked fromsimon-heinen/shake.xml
A simple shake / wiggle animation for Android This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<setxmlns: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 /ViewDragHelper原理与使用.md
CreatedDecember 20, 2022 03:36 — forked fromijinxiao/ViewDragHelper原理与使用.md
flyfire /fileLoader.py
CreatedJune 8, 2022 08:02 — forked frombootchk/fileLoader.py
A class for asynchronous url loading using Qt, PyQt This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
''' | |
Copyright 2014 Lloyd Konneker | |
Release under the GPLv3 | |
''' | |
fromPyQt5.QtCoreimportpyqtSignalasSignal | |
fromPyQt5.QtCoreimportQObject,QByteArray,QUrl | |
fromPyQt5.QtNetworkimportQNetworkAccessManager,QNetworkRequest |
flyfire /kindleDown.js
CreatedJune 6, 2022 07:47 — forked fromyushiro/kindleDown.js
批量从亚马逊中国区下载kindle上购买的电子书 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
varcurIndex=-1; | |
functioncallbackDown(){ | |
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 /web-servers.md
CreatedJune 5, 2022 15:07 — forked fromwillurd/web-servers.md
Big list of http static server one-linersflyfire /custom_game_engines_small_study.md
CreatedJune 5, 2022 10:04 — forked fromraysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom enginesA couple of weeks ago I played (and finished)A Plague Tale, a game byAsobo 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 likeUnreal orUnity for their games (or that's what lot of people think) because d
NewerOlder