Skip to content

Instantly share code, notes, and snippets.

require 'octokit'
username = ''
password = ''
org_name = 'honeypotio'
board_name = 'The Agile Bear'
column_name = 'Live/Done'
client = Octokit::Client.new(login: username, password: password)
user = client.user
Moved => https://github.com/RoxasShadow/usurper
while :; do
currentOwner=$(lsof | grep -i VDC | awk -F '[^[:alnum:]]' '{print $NR}')
if [[ "$currentOwner" == "" && "$previousOwner" != "" && "$currentOwner" != "$previousOwner" ]]; then
previousOwner=""
osascript -e "display notification \"Camera deactivated\" with title \"Apple Camera\""
elif [ "$previousOwner" != "$currentOwner" ]; then
previousOwner=$currentOwner
osascript -e "display notification \"Camera activated by $currentOwner\" with title \"Apple Camera\""
fi

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@RoxasShadow
RoxasShadow / twimg-gm.js
Last active August 29, 2016 21:37
[https://jii.moe/4kxSLhecl.png] Add an "Open images" link inside the gear to the left of the "Following" button in the tweet modal to open the uncompressed version of each image.
// ==UserScript==
// @name Twimg gallery opener
// @namespace https://gist.github.com/RoxasShadow/4111c4ad781613069928
// @description Add an "Open images" link inside the gear to the left of the "Following" button in the tweet modal to open the uncompressed version of each image.
// @include https://twitter.com/*
// @author Roxas Shadow
// @version 3
// @grant none
// ==/UserScript==
require 'uptimerobot'
require 'droplet_kit'
require 'rufus-scheduler'
include UptimeRobot::Monitor
UP_TOKEN = ''
DO_TOKEN = ''
DROPLET_ID = 0
@RoxasShadow
RoxasShadow / nonhocapito.rb
Created August 22, 2015 21:39
The result of two days of play with parslet while I was waiting for dinner on the couch. It's pretty ugly and nonsensical but still :v
require 'pp'
require 'parslet'
require 'parslet/convenience'
module Nonhocapito
class Parslet::Parser
def self.basic_rule(key, input = nil, &block)
block ||= -> { match[input].repeat }
@RoxasShadow
RoxasShadow / notes.md
Last active August 29, 2015 14:21
Notes about rust (pretty much nothing you can find on the book or just googling, but can be useful...)

#1

fn get_results() -> Option<Json> {
  // ...
  let json = &Json::from_str(&body).unwrap();

  return match json.as_object().unwrap().get("results") {
    Some(obj) => Some(obj.clone()),
    _ => None
 }
@RoxasShadow
RoxasShadow / rs-lastfm.rs
Last active August 29, 2015 14:21
Somehow I'm playing with Rust / Moved at https://github.com/RoxasShadow/rustfm
extern crate hyper;
extern crate rustc_serialize;
use std::io::Read;
use std::env;
use hyper::Client;
use hyper::header::Connection;
use rustc_serialize::json::Json;