Skip to content

Instantly share code, notes, and snippets.

$myServer = "localhost";
$myUser = "root";
$myPass = "***";
$myDB = "optinet";
mysql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
@dewski
dewski / gist:184249
Created September 10, 2009 02:25 — forked from markbates/gist:154957
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
// Delegation methods
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
Device *device = [[Device alloc] init];
device.token = [devToken description];
To whom it may concern,
My name is Jake Bellacera, I am 18 years old and I currently attend Sierra College in Rocklin. I have been visiting your company's
website (http://bkwld.com/) every now and then for the past few months and flipping through your gallery; it all seems like very
high-quality work, something I would like to be a part of. I am not looking for a full-time job at this moment due to my classes
but I am available every Monday, Wednesday and Friday with my own vehicle for commuting down to Sacramento.
As for what I have to offer, I know semantic and valid XHTML/CSS, slicing websites in Photoshop and a brief amount of PHP(Zend)/MySQL.
My current job is a web developer position but I feel that it is not challenging enough and I would love to be a part of your team so I could
learn new skills and improve on what I already know.
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('a[rel*=facebox]').facebox({
loading_image : 'loading.gif',
close_image : 'closelabel.gif'
});
$('#project_form').live("submit", function(e){
e.preventDefault();
$.post(
'new_project.php',
var location;
var gotPosition = function (currentLocation) {
console.log(location.longitude);
// currentLocation will be the most up to date
// location will always have a value incase, but may not be the most up to date
// process with whatever you need to do, update interface, etc.
}
Titanium.Geolocation.getCurrentPosition(function(e){
Ti.API.info("received geo response");
@dewski
dewski / gist:1205651
Created September 9, 2011 07:06
Ruby Style Guide
Original Source: https://github.com/chneukirchen/styleguide
= Christian Neukirchen's Ruby Style Guide
You may not like all rules presented here, but they work very well for
me and have helped producing high quality code. Everyone is free to
code however they want, write and follow their own style guides, but
when you contribute to my code, please follow these rules:
@dewski
dewski / locally.sh
Created January 20, 2012 16:58 — forked from jasonroelofs/setup-statsd.sh
Turn an EC2 micro instance into a StatsD/Graphite server
ec2-authorize default -p 2003
@dewski
dewski / teleduino.php
Created April 27, 2012 20:13 — forked from atypical/teleduino.php
teleduino
<?php
include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'_config.php');
include_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'teleduino328_php.php');
if(isset($_SERVER['HTTP_HOST']))
{
echo "<pre>";
}
$Teleduino328PHP = new Teleduino328PHP();
@dewski
dewski / ad
Created April 27, 2012 20:31 — forked from atypical/ad
ad
<form action="url/servo.php?servo=0&position=<? echo $position; ?>" method="post">
<input type="range" min="0" max="180" value="0" step="1" onchange="showValue(this.value)" / style="width:75%; margin:100px auto;">
<input type="submit" name="button" />
</form>
<span id="range">0</span>
<script type="text/javascript">
function showValue(newValue)
{
@dewski
dewski / ad.html
Created April 27, 2012 20:38 — forked from atypical/ad
ad
<!DOCTYPE html>
<html>
<head>
<title>Dope</title>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function() {
var getPositions = function () {
return {
servo: $('#servo').val(),