Skip to content

Instantly share code, notes, and snippets.

View scruffyfox's full-sized avatar
🏳️‍🌈
+++

ScruffyFox scruffyfox

🏳️‍🌈
+++
  • UK
View GitHub Profile
#
# CASINO
#
OnAction PayUser
Variable Global exists {in1}_points
If 3 {exists} == false
Chat Send "/me Thank you @{in1} for opening a bank account! You have been given a complimentary §25,000"
Variable Global Set {in1}_points 25000
Skip 13
Function ' return { "user": "{in1}", "toPay": parseInt("{in2}") || 0, "verbose": {in3} } '
-----------------------------------------------------------------
--------Insert Marker at Edit cursor Custom Name and Color-------
-----------------------------------------------------------------
----------------Outboarder @2017 Reaper 5.32----------------
-----------------------------------------------------------------
--------------------------
-----Available Colors-----
--------------------------
blue = reaper.ColorToNative(0,0,255)|0x1000000
OnInit
OnCommand e 0 !lurk
Chat Send "Thank you for the lurk {user}"
OnChannelPoint "Clap"
Play 60 nowait clapping.mp3
OBS Mute kruiz off
Delay 1
Delay 3
@scruffyfox
scruffyfox / styles.md
Created March 2, 2020 14:44
Styling documentation for Passenger apps

Styles documentation

This document will outline the attribute naming convention, style convention, and list of references and colour names for app theming.

Structure and Definitions

Colours

Colour references are the base data points for the app theming. All themes will reference either a colour reference, or a direct colour hex.

@scruffyfox
scruffyfox / status.java
Created August 16, 2018 10:28
Set action and status colour
/**
* Sets the colour of the actionbar
* @param colourRes
*/
private void setActionColour(@ColorRes int colourRes, @ColorRes int colourResDark)
{
try
{
((AppCompatActivity)getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(colourRes)));
((AppCompatActivity)getActivity()).getSupportActionBar().setElevation(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4f, getResources().getDisplayMetrics()));
public class LegacyViewHelper
{
public static Map<String, ViewResolver> getLegacyViewResolvers()
{
Map<String, ViewResolver> resolvers = new HashMap<>();
LegacyViews[] views = LegacyViews.values();
for (LegacyViews view : views)
{
resolvers.put(view.name(), new DefaultViewResolver(view.getModel(), view.getHolder()));
@scruffyfox
scruffyfox / downvote.js
Created July 17, 2017 14:39
mass downvote anything on the current page
javascript:$('.arrow.down').each(function(i,v){setTimeout(function(){v.click()}, 100)});
@scruffyfox
scruffyfox / ViewExt.kt
Created July 17, 2017 09:29
Kotlin utils
package com.cube.lib.util
import android.app.Activity
import android.support.annotation.IdRes
import android.support.annotation.LayoutRes
import android.support.v4.app.Fragment
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@scruffyfox
scruffyfox / gestures.json
Created July 12, 2017 18:33
Better Touch Tools gestures
{
"BTTPresetName" : "btt_8B308267-5393-4A01-A1B1-2516A8B2F5D3",
"BTTPresetUUID" : "B46E10D9-9ABC-4F16-9AB3-D14E17B2E0DC",
"BTTPresetContent" : [
{
"BTTAppBundleIdentifier" : "com.tinyspeck.slackmacgap",
"BTTAppName" : "Slack",
"BTTAppSpecificSettings" : {
},
@scruffyfox
scruffyfox / VideoPlayer.kt
Last active February 1, 2023 12:57
Playing a video from Assets using ExoPlayer 2
/**
* It took me AGES to figure this out, seriously, exoplayer documentation IS SO BAD.
*/
package xxx
import android.net.Uri
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.cube.arc.R