Skip to content

Instantly share code, notes, and snippets.

View Softwave's full-sized avatar

Softwave Softwave

View GitHub Profile
@Softwave
Softwave / kepler.c
Created September 24, 2012 03:52
Kepler
/* #Script Compiler
* Editor
*/
#include <gtk/gtk.h>
#include <Scintilla.h>
#include <SciLexer.h>
#define PLAT _GTK 1
#include <ScintillaWidget.h>
#include "menu.h"
@Softwave
Softwave / getsource.py
Created December 8, 2012 22:18
GetSource
#!/usr/bin/python
# Get Source
# Simple tool to fetch the sourcecode of a website from the command line
# by Softwave 2012
# License: Public Domain
import easygui as eg
import urllib
import sys
@Softwave
Softwave / checkconnection.py
Created December 8, 2012 22:22
Checks connection
import urllib2
import sys
try:
urllib2.urlopen("http://www.google.com/", timeout=2)
print "Your connection appears to be working"
except urllib2.URLError:
print "Your connection appears to be down"
@Softwave
Softwave / tempconv.py
Created December 8, 2012 22:25
Temperature converter
#!/usr/bin/python
# Simple Temperature Converter Written in Python
# License: Public Domain
# Usage: conv input_unit value
# Usage example: tempconv F 32
import sys
#Welcome
if (num_electrons == 6) {
//Carbon
//script_execute(createShells,2);
newShell = instance_create((100015).x,(100015).y,shell1);
newShell2 = instance_create((100015).x,(100015).y,shell2);
ne1 = instance_create(0,0,electron);
ne2 = instance_create(0,0,electron);
ne3 = instance_create(0,0,electron);
ne4 = instance_create(0,0,electron);
ne5 = instance_create(0,0,electron);
/* Seeing if I can complete the first project euler problem with
javascript and node.js */
var sum = 0;
var r;
var r2;
for (var i = 0;i < 1000;i++) {
r = i % 3;
r2 = i % 5;
@Softwave
Softwave / projectEuler2.js
Created June 25, 2013 02:28
JavaScript program to find the solution for project euler problem 2
/* Project Euler Problem 2 */
var sum = 0;
var num,num1,num2;
for (var i = 0; i < 800; i++) {
if (i == 0) {
num1 = 1;
num2 = 2;
console.log('1 \n\n2 \n');
/* Cuddle Club CSS Code
* Paste in "Add Custom CSS"
*/
@import url(http://fonts.googleapis.com/css?family=Montez|Sacramento|Dancing+Script:400,700);
#wrapper #title {
font-family: Dancing Script;
font-weight: 200;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stopwatch</title>
</head>
<body onload="show();">
<div>Time: <span id="time"></span></div>
<input type="button" value="start" onclick="start();">
<input type="button" value="stop" onclick="stop();">
@Softwave
Softwave / gist:7417801
Created November 11, 2013 18:22
Typer
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
/*
* RetroTerm
*/
static void prnt(char ch);