Skip to content

Instantly share code, notes, and snippets.

Avatar
🌑
...

öppenteknikstudio fiskurgit

🌑
...
View GitHub Profile
View gist:8803490
100 REM Circular 3D plot program
110 MODE1
120 GCOL0,2
130 VDU19,0,4,0,0,0
140 GCOL0,128:CLG
150 K=5*PI/10000
160 DEF FNA(Z)=10*SIN(K*(X*X+Y*Y))
170 FOR X=-100 TO 100 STEP 2
180 Z1=0
190 Y1=5*INT(SQR(10000-X*X)/5)
@fiskurgit
fiskurgit / gist:8804703
Last active Aug 29, 2015
BBC Basic plot
View gist:8804703
1 REM Rotation
10 MODE 4: VDU 29,640;512;: XS=4: YS=4
20 A=640: B=A*A: C=512
30 FOR X=0 TO A STEP XS: S=X*X: P=SQR(B-S)
50 FOR I= -P TO P STEP 6*YS
70 R=SQR(S+I*I)/A
80 Q=(R-1)*SIN(24*R)
90 Y=I/3+Q*C
95 IF I= -P THEN M=Y: GOTO 110
l00 IF Y>M M=Y: GOTO 130
@fiskurgit
fiskurgit / StarSpell.bas
Last active Aug 29, 2015
Work in progress
View StarSpell.bas
100MODE7
110REM"***** STARSPELL *****
130REM"(C)FISHER_MARRIOTT 1982
150REM"LIST BASED ON CLASSROOM INDEX
160REM"OF PHONIC RESOURCES N.A.R.E
161*SK
180DIMw$(20)
190DIMlist$(20)
200E$=STRING$(54,"?"):E$=""
210DIMN%(12):DIMP%(12):DIMQ%(12):DIMR%(12)
View StarSpellFormatted.bas
10 TRACEON
100 MODE7
110 REM ***** STARSPELL *****
130 REM (C)FISHER_MARRIOTT 1982
150 REM LIST BASED ON CLASSROOM INDEX
160 REM OF PHONIC RESOURCES N.A.R.E
161 REM *SK
180 DIM w$(20)
190 DIM lst$(20)
200 E$ = STRING$(54,"?") : E$=""
@fiskurgit
fiskurgit / bbcascii.pde
Last active Aug 29, 2015
Work in progress
View bbcascii.pde
PrintWriter output;
//String scale = "@ M B H E N R # K W X D F P Q A S U Z b d e h x * 8 G m & 0 4 L O V Y k p q 5 T a g n s 6 9 o w z $ C I u 2 3 J c f r y % 1 v 7 l + i t [ ] { } ? j | ( ) = ~ ! - < > ^ _ ' ; , : ` .";
String scale = "@ M B H E N R # K W X D F P Q A S U Z * 8 G & 0 4 L O V Y 5 T 6 9 $ C I 2 3 J % 1 7 + ? ( ) = ! - < > ' ; , : .";
String[] scaleChars = split(scale, " ");
String mImageFileName = "sal.jpg";
int mImageWidth = 529;
int mImageHeight = 532;
int mColumns = 65;
@fiskurgit
fiskurgit / hctojson.java
Created Feb 22, 2014
Parse hippocamp.net catalogue from html using JSoup
View hctojson.java
package hctojson;
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
public class hctojson {
@fiskurgit
fiskurgit / gist:9366187
Created Mar 5, 2014
Archive.org JSoup Scraper - Work in progress, and not pretty.
View gist:9366187
package com.fiskur;
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
*
@fiskurgit
fiskurgit / gist:1bb7139d21c4b3db82ec
Created May 13, 2014
Original Google volley encodeParameters method
View gist:1bb7139d21c4b3db82ec
/**
* Converts <code>params</code> into an application/x-www-form-urlencoded encoded string.
*/
private byte[] encodeParameters(Map<String, String> params, String paramsEncoding) {
StringBuilder encodedParams = new StringBuilder();
try {
for (Map.Entry<String, String> entry : params.entrySet()) {
encodedParams.append(URLEncoder.encode(entry.getKey(), paramsEncoding));
encodedParams.append('=');
encodedParams.append(URLEncoder.encode(entry.getValue(), paramsEncoding));
@fiskurgit
fiskurgit / gist:9c21a55cb015065222b8
Last active Aug 29, 2015
Fixed Google Volley encodeParameters method
View gist:9c21a55cb015065222b8
/**
* Converts <code>params</code> into an application/x-www-form-urlencoded encoded string.
*/
private byte[] encodeParameters(Map<String, String> params, String paramsEncoding) {
StringBuilder encodedParams = new StringBuilder();
try {
for(Iterator<Map.Entry<String, String>> i = params.entrySet().iterator(); i.hasNext(); ){
Map.Entry<String, String> entry = i.next();
@fiskurgit
fiskurgit / gist:766f315a12d7ee39af5a
Last active Aug 29, 2015
Perlin wave processing.org sketch
View gist:766f315a12d7ee39af5a
float noiseScale = 0.018F;
float n = 0.0F;
float speed = 0.4F;
int frameCount = 0;
void setup(){
size(600, 300);
frameRate(30);
}