Skip to content

Instantly share code, notes, and snippets.

@optedoblivion
optedoblivion / gist:f04db3514c6849cc6580e7b5000a5a32
Created September 13, 2020 22:56
Auto updating Minecraft Server
root@hwsrv-623932:~# crontab -l
## HOST ENTRIES
10 8 * * * /bin/bash /etc/hwautomate/hostwinds_backups.sh > /dev/null 2>&1
# Custom Entries
# Update minecraft to latest every morning at 4am
0 4 * * * /opt/minecraft/tools/update.sh
root@hwsrv-623932:~# cat /opt/minecraft/tools/update.sh
#!/bin/bash
"""
Save as calculate_compound_fps.py
run it in the terminal
$ python calculate_compound_fps.py
$ python calculate_compound_fps.py 340 64 28 420
"""
#!/usr/bin/env python
import sys

Keybase proof

I hereby claim:

  • I am optedoblivion on github.
  • I am optedoblivion (https://keybase.io/optedoblivion) on keybase.
  • I have a public key whose fingerprint is 799D A03C 2284 1579 DCB1 C3BC B5D8 7C85 C2BA 50F9

To claim this, I am signing this object:

#!/bin/bash
# Supported list
SUPPORTED_PLATFORMS="Linux Darwin"
# Check platform
UNAME=$(uname)
VALID_PLATFORM=0
for platform in `echo $SUPPORTED_PLATFORMS`;
do
public class BuildEnvelope extends Activity {
private static Context mContext;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
mContext = this;
setContentView(R.layout.buildenvelope);
try
@optedoblivion
optedoblivion / fucked-repo-sync.sh
Created September 11, 2011 01:41
fucked-repo-sync
#!/bin/bash
source build/envsetup.sh
reposync `cat .repo/manifest.xml |grep github| awk '{ print $2 }'| grep -v "name=" | cut -d '"' -f 2| xargs`
reposync `cat .repo/local_manifest.xml |grep project|awk '{ print $2 }'|cut -d '"' -f 2|xargs`
#!/bin/bash
REQUIRED="locate zenity"
for req in $(echo $REQUIRED);
do
type -P "$req" &>/dev/null || { echo "Install '$req'" >&2; exit 1; }
done
if [ $# -lt 1 ]; then
@optedoblivion
optedoblivion / repo-sync-n-show.sh
Created May 10, 2011 23:48
Repo Sync and Show Diff
#!/bin/bash
#
#
# repo forall -c "script.sh"
#
#
OUTPUT="$HOME/reposync.log"
echo "" > $OUTPUT
LASTHASH=$(git log --pretty=oneline|awk '{ print $1 }'| head -n 1)
git pull --rebase
@optedoblivion
optedoblivion / gist:850001
Created March 1, 2011 22:15
Test Spinner
package com.optedoblivion.test;
import java.util.Arrays;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;