Skip to content

Instantly share code, notes, and snippets.

View MarcBernstein's full-sized avatar
🤖
Beep boop.

Marc Bernstein MarcBernstein

🤖
Beep boop.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcbernstein on github.
  • I am marccbernstein (https://keybase.io/marccbernstein) on keybase.
  • I have a public key ASAkeQ4-9FOmmTEtd3w58NvFxXdAhxPxo4Iym_7bXWLX-go

To claim this, I am signing this object:

@MarcBernstein
MarcBernstein / slackstatus.sh
Last active April 14, 2017 15:28
Sets Slack status using new Status API. Save the script somewhere in your $PATH and set it executable.
#!/bin/bash
# Sets Slack status using new Status API.
# Save the script somewhere in your $PATH and set it executable.
slacktoken=<Your auth token, get one here https://api.slack.com/custom-integrations/legacy-tokens>
apiurl="https://slack.com/api/users.profile.set?token="$slacktoken"&profile="
if ! [ $# -eq 0 ] && ! [ $# -eq 2 ]; then
echo "Script takes exactly 0 (remove status ) or 2 arguments (emoji and status (in quotes if more than one word)).";
exit 1;

Keybase proof

I hereby claim:

  • I am marcbernstein on github.
  • I am marcbernstein (https://keybase.io/marcbernstein) on keybase.
  • I have a public key ASAD_hdJfxN_NV6kKzJpo7X5Qlf0pdCe2T89DCTCbAcpuwo

To claim this, I am signing this object:

import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.os.Build;