Skip to content

Instantly share code, notes, and snippets.

View billmote's full-sized avatar

Bill Mote billmote

  • Boca Raton, FL
  • 02:17 (UTC -05:00)
View GitHub Profile
@billmote
billmote / README.md
Last active August 29, 2015 14:12 — forked from nickbudi/README.md

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config.

Put the files autoexec.cfg and video.txt in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

Launch Options

-novid -noborder -high -threads 4 -freq 144 -refresh 144 -tickrate 128 -nojoy -nod3d9ex -noaafonts +exec autoexec.cfg +mat_vignette_enable 0 -processheap
@billmote
billmote / autobuy.txt
Last active August 3, 2017 11:38
CS:GO key mappings and custom config
// This list of "buy aliases" is used by the AutoBuy system.
// The system begins with the first alias in the list, and attempts to purchase it.
// If a primary weapon is successfully purchased, all later primary weapon aliases are skipped.
// Similarly, secondary weapon buy alias are skipped once a seconary weapon has been purchased.
// You can customize this file to reflect your weapon and equipment preferences and priorities.
//
// Attempting to purchase a weapon that shares a slot with another weapon on that team
// (like the m4a1 and m4a1_silencer), will purchase the weapon currently equipped in that slot if possible.
//
// The console command for autobuy is "autobuy"
...
apply plugin: 'findbugs'
...
task findbugs(type: FindBugs, dependsOn: assembleDebug) {
excludeFilter file("${project.rootDir}/config/findbugs/exclude.xml")
classes = fileTree('build/intermediates/classes/debug/') // Varies based on your app build configs and flavors...
source = fileTree('src/main/java/')
import android.app.Activity;
import android.content.Context;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.test.ActivityInstrumentationTestCase2;
/**
* This requires to be declared in the effective manifest:
* <uses-permission android:name="android.permission.WAKE_LOCK"/>
*
@billmote
billmote / KeepScreenOn.java
Created February 4, 2015 15:47
Keep the screen on while the activity is visible.
public class KeepScreenOn extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_keepscreenon);
}
@Override
protected void onResume() {
@billmote
billmote / AndroidManifest.xml
Last active October 15, 2023 10:48 — forked from JakeWharton/gist:f50f3b4d87e57d8e96e9
When pushing code from your IDE, wake the device and show the activity.
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>
@billmote
billmote / commands.sh
Last active August 29, 2015 14:15
Helpful Commands
# Search & Replace contents of a file -- in this case we're searching for jb4ASDK@ in all files and replacing with ~!
grep -IRlr jb4ASDK@ . | xargs sed -i "" -e 's/jb4ASDK@/~!/g'
# Human readable folder utilization from current folder
sudo du -sh $(ls -d $(pwd)/*)
# When git doesn't know who we are:
eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa
@billmote
billmote / PrettyDate.java
Created February 20, 2015 16:34
Formats dates to sortable UTC strings in compliance with ISO-8601.
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
/**
* Formats dates to sortable UTC strings in compliance with ISO-8601.
*/
public class PrettyDate {
public static String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS zzz";
public static String LEGACY_FORMAT = "EEE MMM dd hh:mm:ss zzz yyyy";
@billmote
billmote / Movie.java
Last active August 29, 2015 14:16
A custom TypeAdapter to handle the case when Rotten Tomatoes returns "" rather than a number when runtime is null.
@Parcel
@DebugLog
public class Movie {
@Expose
public String id;
@Expose
public String title;
@Expose
public Integer year;
@billmote
billmote / Movie.java
Last active August 29, 2015 14:16
An alternative to the custom TypeAdapter to handle Rotten Tomatoes returning different JSON primitives for Movie runtime
@DebugLog
public class Movie {
@Expose
public Object runtime;
// ...
public Integer getMovieRuntime() {
if (runtime instanceof String && !TextUtils.isEmpty((String) runtime)) {
return Integer.valueOf((String) runtime);
} else if (runtime instanceof Integer) {
return (Integer) runtime;