Skip to content

Instantly share code, notes, and snippets.

View atommarvel's full-sized avatar

Atom Raiff atommarvel

View GitHub Profile
@atommarvel
atommarvel / wiggle.kt
Created June 26, 2021 03:57
Wiggle Wiggle
@Composable
fun WiggleWiggle() {
val targetDegrees by flippyFloats()
val degrees by animateFloatAsState(targetValue = targetDegrees)
Icon(
imageVector = Icons.Default.Notifications,
contentDescription = "Ding!",
modifier = Modifier.rotate(degrees)
)
}
@atommarvel
atommarvel / add.java
Last active November 3, 2015 17:50
addInstagramPosts
public void addInstagramPosts(List<InstagramPost> posts) {
if (posts == null) {
throw new IllegalArgumentException(String.format("Attemping to add a null posts to %s", DATABASE_NAME));
}
// Take a look at the helper methods addImage, addComment, etc as you implement this method
// It's also a good idea to do this work in a transaction
SQLiteDatabase db = getWritableDatabase();
db.beginTransaction();
try {
for (InstagramPost post : posts) {
@atommarvel
atommarvel / React list
Last active August 29, 2015 14:22
React Example
var AppLink = React.createClass({
render: function() {
return <li onClick={this.props.select.bind(null,this.props.app)}>
{this.props.app}
</li>;
},
});
var AppList = React.createClass({
render: function() {
@atommarvel
atommarvel / UltimateUkulele
Last active August 29, 2015 14:19
Ultimate Ukulele bookmarklet
javascript:instr='ukulele';acc_tuning=decodeURIComponent('G C E A');$('body').removeClass('guitar');$('body').addClass('ukulele');$('.u_b').click();setTimeout(function(){$('.d_b').click();},500);void%200
@atommarvel
atommarvel / gist:10775638
Created April 15, 2014 21:14
canvas tut
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="c"></canvas>
<script>
var canvas = document.getElementById("c");
var ctx = canvas.getContext("2d");
//posting
var xmlhttp=new XMLHttpRequest();
var url = "http://marvel.com/my_account/my_must_reads";
var params = "id=";
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(params);
//unchecking
test = document.getElementsByTagName("input")
@atommarvel
atommarvel / google form buttons
Created December 5, 2013 20:19
Select all 2s for the cog-sci survey: https://docs.google.com/forms/d/1FkufmvCmpl4U8zf4eWc49f5OiNsOxmRT0INWQ6o_FuU/viewform just open up the javascript console (crtl-shift-i) and paste this in and hit enter
var btns = document.getElementsByClassName("ss-q-radio");
for(var x = 0; x<btns.length; x++){
if(parseInt(btns[x].getAttribute("value")) == 2)
btns[x].click();
}
@atommarvel
atommarvel / Auto GT Login
Created November 20, 2013 05:28
Simply re-enables chrome's ability to autocomplete the login form for logging into tsquare,buzzport,degeeworks, etc
// ==UserScript==
// @name Auto GT Login
// @namespace http://www.atommarvel.com
// @version 1.0
// @description Simply re-enables chrome's ability to autocomplete the login form for logging into tsquare,buzzport,degeeworks, etc
// @match https://login.gatech.edu/*
// @copyright 2012+, Atom Marvel Raiff
// ==/UserScript==
document.getElementById("username").removeAttribute("autocomplete");
@atommarvel
atommarvel / GDLE
Last active December 28, 2015 20:29
GTother Device Login Experience (GDLE) let's you manage your device logins for GTother in a snap. Be sure to add your login credentials to the beginning script to make it even faster.
// ==UserScript==
// @name GDLE
// @namespace http://www.atommarvel.com/
// @version 2.0
// @description GDLE let's you manage your device logins for GTother in a snap.
// @match https://auth.lawn.gatech.edu/*
// @copyright 2013+, Atom Marvel Raiff
// ==/UserScript==
//Add your account info here!
var loginMac = function(index, pw){
var macAddresses = ["f8:8f:ca:24:c4:ef" //glass
,"40:f4:07:67:35:82"]; //3ds
var username = document.getElementById("username");
var password = document.getElementById("password");
var mac = document.getElementById("devlogin_mac");
username.value = "araiff3"
password.value = pw;
mac.value = macAddresses[index];