Skip to content

Instantly share code, notes, and snippets.

@Chovin
Chovin / 6-24 Clash Challenge.md
Last active June 26, 2016 23:29
We did a Codingame.com Clash of Code session during the 6-24 campsite meeting. Try it out for yourself!

####// Stuff you may need

// for loops. Ask in Gitter for an explanation (or look on google)

for (var i = 0; i < 10; i++) {
	// code here
}

// length of a string

'use strict';
var nconf = require('nconf').file({file: getUserHome() + '/sound-machine-config.json'});
function saveSettings(settingKey, settingValue) {
nconf.set(settingKey, settingValue);
nconf.save();
}
https://github.com/timonwong/OmniMarkupPreviewer/issues/85
Find the python-markdown sublime package.
On the Mac: subl "/Users/<username>/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py"
Replace the makeExtension() method with the following:
def makeExtension(*args, **kwargs):
return StrikeoutExtension(*args, **kwargs)
@Chovin
Chovin / repl.py
Created August 30, 2016 08:04
slight edit to RoboDanny's repl.py
from discord.ext import commands
from .utils import checks
from .utils.dataIO import fileIO
from .utils.chat_formatting import pagify
import asyncio
import traceback
import discord
import inspect
from contextlib import redirect_stdout
from __main__ import send_cmd_help
from discord.ext import commands
from .utils import checks
from .utils.dataIO import dataIO
import discord
import os
RED_SID = "133049272517001216"
def _in_red_server_check(ctx):
@Chovin
Chovin / mirror rot.p8.lua
Created April 10, 2017 23:09
pico8 tweetjam
::a::cls()y=rnd(9)x=y
w=y
while 1 do
c=1+pget(x,y)pset(x,y,c)x,y=y,(x*cos(w)-y/w*sin(w))%127
if(c>15)goto a
end--#tweetjam #april3030 #pico8
-- this is a pico8(lua) comment. it is ignored by the program
::a:: -- this is a label. it allows us to goto it later (good for looping)
cls() -- 1st, clear the screen
-- then set our starting values
y=rnd(9) -- we'll use a random number between 0 and 9, not including 9
x=y -- x, y, and w all start with this random number. x,y will be our coordinates.
w=y -- w will be our salt. we won't change it after this.
-- now we're ready to start drawing!
while 1 do -- repeatedly execute the following code (until we tell it go elsewhere)
x=0p={}f=133t=0::a::z=x%f
y=x/f
if(t<f)p[x]=pget(z,y)
c=p[x]
if(y+sin(t)*7+t/f>f)z+=sin(y/60+t)-3 c+=1
pset(z,y,c)x=(x+1)%(f*f)t+=1/f
goto a
-- this is a pico8(lua) comment. it is ignored by the program
-- first we set up some variables
z=0 -- this will be our index so we know what pixel we're on.
p={} -- we need to store all the pixels on the screen so we have a base set of pixels to manipulate
f=133 -- this will control how many pixels we try to read per line
-- notice, I chose a little more than 128 pixels. This is to adjust for sideways movement
-- as well as various timing things that use this as part of their calculation.
t=0 -- tick counter
@Chovin
Chovin / LiveCoding mac notes.md
Last active December 7, 2017 23:28
various startup / setup notes on some live coding environments

What Do, How Do, Live Code

Audio

FoxDot

  1. Open up SuperCollider
  2. cmd+open FoxDot/supercollider.sc
  3. cmd+enter execute each of these separately