Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nderscore's full-sized avatar
👉
😎 👉

_nderscore nderscore

👉
😎 👉
View GitHub Profile
@nderscore
nderscore / TamaguiZeego.tsx
Last active February 12, 2024 00:52
Example of how to wrap Zeego's components with Tamagui styles
import { FC } from 'react';
/**
* Utilities to make Typescript happy wrapping Zeego components with Tamagui's
* styled() components. These utils do nothing except assign Typescript types.
*
* Makes the following props optional and of `unknown` type:
* - children
* - key
*
@nderscore
nderscore / tamagui-ts-plugin-expo-only.md
Created August 14, 2023 03:36
tamagui-typescript-plugin workaround for expo-only

Workaround for Expo-only usage

This is hopefully a temporary workaround to enable Expo-only users to use tamagui-typescript-plugin

  1. Add @tamagui/static to your project

    yarn add @tamagui/static
    
@nderscore
nderscore / TamaguiSolitoTextLink.tsx
Last active October 21, 2023 17:45
Example Tamagui Solito Text Link
@nderscore
nderscore / tetris_attack_netplay.md
Last active November 27, 2022 14:50
Guide for configuring Retroarch with Snes9x Core for Tetris Attack netplay.

Tetris Attack

Tetris Attack Netplay Guide

Guide for configuring Retroarch with Snes9x Core for Tetris Attack netplay.

Last updated: 2017.08.13 by _nderscore

if (window.speechSynthesis && console.log.name !== 'talkLog') {
console.log = (log => function talkLog(){
[...arguments].forEach(item => {
if (typeof item !== 'string') {
try {
item = `Object: ${JSON.stringify(item)}`;
} catch (e) {
item = '';
}
}
@nderscore
nderscore / ichc_popout.js
Last active December 22, 2015 04:39
Popout Chat Bookmarklet for ICHC
javascript:(function(){$.getScript('http://nderscore.com/_stuff/popout.js');})();
@nderscore
nderscore / ttSongLog.js
Last active December 20, 2015 05:59
Bookmarklet. Creates a log of all songs played in a room. Run the bookmark once to start logging, and run it again later on to pull up the log. The bookmark will also pull the recently played tracks list.
javascript:(function(){if(window.ttLOG){var e=[];ttLOG.forEach(function(t){var n=t.song;e.push("[DJ: "+t.dj+" ] "+n.artist+" - "+n.song+(n.album?" [ "+n.album+" ]":""))});var t=$('<textarea style="width:640px;height:480px;"></textarea>').text(e.join("\n"));var n=$('<div id="qqq" style="position:absolute;top:0;left:0;z-index:99999;"><a href="javascript:$(\'#qqq\').remove();" style="background:#000;color:#fff;">[close]</a></div>');n.prepend(t);$("body").append(n)}else{ttLOG=[];(function(){for(i in turntable)if(turntable[i]&&turntable[i].roomId)return turntable[i]})().roomData.metadata.songlog.forEach(function(e){ttLOG.push({dj:e.djname,song:e.metadata})});turntable.addEventListener("message",function(e){if(!e.command||e.command!="newsong")return;var t=e.room.metadata.current_song;ttLOG.push({dj:t.djname,song:t.metadata})});alert("Started Logging. Run bookmark again to view the log.")}})()
@nderscore
nderscore / ttDeafnessCure.js
Last active December 18, 2015 07:19
Bookmarklet. Prevents deafness for lonely DJ's on turntable.fm
javascript:(function(){for(var x in turntable){if(turntable[x]!=null&&turntable[x].hasOwnProperty('numDjs')&&!turntable[x].hasOwnProperty('numDjsClone')){turntable[x]['numDjsClone']=turntable[x]['numDjs'];turntable[x]['numDjs']=function(){if(this.numDjsClone()==1)return 0;return this.numDjsClone();};alert("Deafness cure applied successfully! :)");}}})();
/* _nderscore/turntable.fm */
@nderscore
nderscore / ttExportQueue.js
Last active December 18, 2015 07:19
Bookmarklet. Displays a textbox containing every track in your current playlist queue on turntable.fm. Format for tracks is Artist - [Album] Title.
javascript:(function(){var ids=turntable.playlist.fileids,tracks=turntable.playlist.songsByFid,output=[],meta={},item="";for(var i in ids){meta=tracks[ids[i]].metadata;item =meta.artist+" - "+meta.song;if(meta['album'])item+=" [ "+meta.album+" ]";output.push(item);}output.sort();var o=$('<textarea style="width:640px;height:480px;"></textarea>').text(output.join('\n'));var d=$('<div id="qqq" style="position:absolute;top:0;left:0;z-index:99999;"><a href="javascript:$(\'#qqq\').remove();" style="background:#000;color:#fff;">[close]</a></div>');d.prepend(o);$('body').append(d);})();
/* _nderscore/turntable.fm */
@nderscore
nderscore / ttTags.js
Last active December 18, 2015 07:19
Bookmarklet. Displays all available metadata for the currently playing track on turntable.fm. Track tags are output to the chat area and only visible to you.
javascript:(function(){for(var x in turntable){if(turntable[x]!=null&&turntable[x].hasOwnProperty('numDjs')){var s=turntable[x].currentSong.metadata,e=document.createElement("div");e.className="message";e.innerHTML="<b>Artist:</b> "+s.artist+"<br /><b>Album:</b> "+s.album+"<br /><b>Song:</b> "+s.song+"<br /><b>Genre:</b> "+s.genre+"<br /><b>Length:</b> "+Math.floor(s.length/60)+"m"+(s.length%60)+"s";var m=document.getElementsByClassName("messages")[0];m.appendChild(e);m.scrollTop+=999;}}})();
/* _nderscore/turntable.fm */