This file contains 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
/* | |
* Call to toggle lag settings, eg via binding input actions. | |
* Useful for testing client side prediction, server reconciliation, server side rewind, ... | |
* | |
* 1) If lag and loss settings are set, reset | |
* 2) If lag setting is set, set loss setting | |
* 3) Else set lag setting | |
*/ | |
void ToggleLag() | |
{ |
This file contains 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
#!/bin/bash | |
# Fetches a patch from a given url and tries to apply it to the current directory | |
# If GitHub commit links get copy pasted as url, it will append ".patch", else it | |
# will take the URL as-is. | |
# Main motivation behind this: i hate to add many different remotes and when i pick | |
# from GitHub or CAF, it should be fast and hassle free. | |
#set -x |
This file contains 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
package at.amartinz.platformtest | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
} |
This file contains 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
export GIT_PS1_SHOWDIRTYSTATE=true | |
export GIT_PS1_SHOWUNTRACKEDFILES=true | |
# file included below, i would use absolute paths, like | |
# source /opt/config/git-prompt.bash | |
source git-prompt.bash | |
set_prompt () { | |
Last_Command=$? # Must come first! | |
Blue='\[\e[01;34m\]' |
This file contains 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
private void rotateView(View v) { | |
if (v == null) { | |
return; | |
} | |
v.clearAnimation(); | |
ObjectAnimator animator = ObjectAnimator.ofFloat(v, "rotation", 0.0f, 360.0f); | |
animator.setDuration(500); | |
animator.setInterpolator(new AccelerateDecelerateInterpolator()); | |
animator.start(); |
This file contains 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
#!/usr/bin/perl | |
###################################################################### | |
# | |
# File : split_bootimg.pl | |
# Author(s) : William Enck <enck@cse.psu.edu> | |
# Description : Split appart an Android boot image created | |
# with mkbootimg. The format can be found in | |
# android-src/system/core/mkbootimg/bootimg.h | |
# | |
# Thanks to alansj on xda-developers.com for |