This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TextureTransformation.shader | |
// A simple shader that allows us to transition between two textures from a script. | |
// | |
// Author: Nathan Campos <nathan@innoveworkshop.com> | |
Shader "Custom/TextureTransformation" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Original Texture", 2D) = "white" {} | |
_TransTex("Transformed Texture", 2D) = "gray" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: MintyUSBoost.c | |
* Author: Nathan Campos <nathanpc@dreamintech.net> | |
* | |
* Created on February 14, 2016, 2:45 PM | |
*/ | |
// 12F683 | |
// +---------+ | |
// -|Vdd Vss|- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#make_COM# | |
; COM file is loaded at CS:0100h | |
org 10h | |
; ******************************** | |
; * Program: ASCIICONV.ASM * | |
; ******************************** | |
include 'emu8086.inc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<!-- Android | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> | |
<meta charset="utf-8">--> | |
<!-- iPad/iPhone specific css below, add after your main css > |
This style guide is based on the one used by GitHub, but with some changes that make the code a tiny bit more readable.
-
Use soft-tabs with a two space indent.
-
Keep each line of code to a readable length. Unless you have a reason to, keep lines to fewer than 100 characters.
-
Never leave trailing whitespace.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void *IRC_Client::handle_recv(void) { | |
// recv some data. | |
int numbytes; | |
char buffer[MAXDATASIZE]; | |
while (true) { | |
numbytes = recv(socket_descriptor, buffer, MAXDATASIZE - 1, 0); | |
buffer[numbytes] = '\0'; | |
if (numbytes == 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timer timer = new Timer(); | |
timer.scheduleAtFixedRate(new TimerTask() { | |
public void run() { | |
UiApplication.getUiApplication().invokeLater(new Runnable() { | |
public void run() { | |
// Do something when the timer ticks | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-bb-type="item" onclick="alert('this was clicked')" class="bb-hires-image-list-item" onmouseover="this.setAttribute('class','bb-hires-image-list-item-hover')" onmouseout="this.setAttribute('class','bb-hires-image-list-item')" x-blackberry-focusable="true"><img src="images/test.png"> | |
<div class="details"> | |
<span class="title">Title goes here</span> | |
<span class="accent-text"></span> | |
<div class="description">A description is welcome.</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb.init({ | |
onscreenready: function (element, id) { | |
if (id == "main") { | |
var item = element.createElement('div'); | |
item.setAttribute('data-bb-type','item'); | |
item.setAttribute('data-bb-title','my title'); | |
item.innerHTML = 'my description'; | |
item.setAttribute('data-bb-img','foo.png'); | |
element.getElementById('mylist').appendItem(item); |