Skip to content

Instantly share code, notes, and snippets.

View ingochris's full-sized avatar
🏸
ssh -l level1 blackbox.smashthestack.org -p2225

Christopher Ngo ingochris

🏸
ssh -l level1 blackbox.smashthestack.org -p2225
View GitHub Profile
/*
- Uses system calls rather than <stdio.h> to read standard input and write standard output
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> // To use read and write
#include <sys/stat.h> // To use fstat()
// Global declaration to count the number of comparisons throughout the program
@ingochris
ingochris / glass.html
Last active August 29, 2015 14:20 — forked from bwhite/glass.html
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function main() {
if (WS.scriptVersion(1)) return;
WS.subscribe("gesture:pebble:singleClick:UP", function () {
WS.control('SWIPE_LEFT');
});
WS.subscribe("gesture:pebble:singleClick:DOWN", function () {
WS.control('SWIPE_RIGHT');
// 10*8 LED matrix with 4017 IC
// LED maze commented
#include <Servo.h>
int clock = 9;// goes to the clock pin on the 4017 IC
int reset = 8;//goes to the reset pin on the 4017 IC
int analogIn = A1;
int value = 0;
/**
* Created by Umcookies on a potarto.
*/
API.on(API.chatLog("Use /background to set your new background and /player /vote /join /avatar to change the position of the respective UI elements", 1));
API.on(API.chatLog("You can use /move if any UI part's move, it wont prompt for any inputs. You can also use /keeppos which will check every second if a UI element has moved (recommended)"));
API.on(API.CHAT_COMMAND, awesomethings);
//variables
var backgroundurl = "https://cdn.plug.dj/_/static/images/community/background.ae45269504d5329fb78e47e9bd4be2da0698f284.jpg";
var playerWhereX = document.getElementById("playback").style.left.replace("px", "");
var playerWhereY = "54";