Skip to content

Commit

Permalink
Initial commit - import from TroopQuark
Browse files Browse the repository at this point in the history
  • Loading branch information
munshkr committed Mar 7, 2020
0 parents commit 351f504
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
6 changes: 6 additions & 0 deletions Flok.quark
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(
\name: "Flok",
\summary: "OSCFunc that allows flok-repl to execute SuperCollider code",
\author: "Damian Silvani, Ryan Kirkbride",
\since: "2020",
)
37 changes: 37 additions & 0 deletions Flok.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Flok {
*start {
arg verbose = false;

'Listening for messages from Flok'.postln;

// Listen for other messages and check the password

OSCFunc(
{
arg msg, time, addr, port;
var interp;

// If the verbose flag is True, print the code

if (verbose == true){
msg[1].asString.postln;
};

// Only interpret code sent from a local ip address

if (NetAddr.matchLangIP(addr.ip) == true) {
defer {
thisProcess.interpreter
.cmdLine_(msg[1].asString)
.interpretPrintCmdLine;
}
} {
'Warning: external Flok message attempted from'.postln;
addr.postln;
};

},
'flok'
);
}
}

0 comments on commit 351f504

Please sign in to comment.