View dblcheck.php
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
<?php | |
/* Let's say the variable $input contains a user-submitted link */ | |
$parsed_url = parse_url($input); | |
if ($parsed_url != false) { | |
/* The domain should be found using the 'host' key */ | |
$domain = $parsed_url['host']; | |
/* Now check that domain against the DBL */ | |
$dbl_record = dns_get_record($domain); |
View gist:2189280
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
shapeOptions = [ | |
{ | |
node: "select" | |
children: [ | |
{ | |
node: "option" | |
attrs: { | |
value: "rectangle" | |
} | |
content: "Rectangle" |
View example.c
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
struct crb_game { | |
int state; | |
char *name; | |
crb_gfx *gfx; | |
crb_snd *snd; | |
crb_lua *lua; | |
int (*on_start)(void); | |
int (*on_stop)(void); |
View ui.coffee
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
### | |
UI Element classes | |
Written by Eddie Ringle | |
### | |
class Button extends HTMLButtonElement | |
constructor: (@className, value) -> | |
@innerHTML = value | |
setValue: (value) -> |
View hashtable.c
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
/* | |
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
View darray.c
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
/* | |
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
View llist.c
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
/* | |
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
View update
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
#!/bin/sh | |
# | |
# All-in-one script for system maintenence via APT | |
# | |
# sudo wget http://files.idlesoft.net/pub/update -O /usr/local/sbin/update | |
# sudo chmod a+x /usr/local/sbin/update | |
# | |
echo ".::Updating sources::." | |
apt-get update |
View entity.h
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
/* | |
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
View gist_test
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
Test 1 | |
Modifying this gist. |