This file contains hidden or 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
class FooBar | |
def initialize(foo) | |
@foo = foo | |
end | |
def foo | |
puts "FooBar#foo @foo: #{@foo}" | |
end | |
def self.bar(options={}) | |
puts "FooBar.bar options[:thing]: #{options[:thing]}" | |
end |
This file contains hidden or 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
print_r($_POST); | |
foreach($_POST as $v => $k) | |
{ | |
echo '\$'. $v . ' = $_POST[\'' . $v . '\']<br>'; | |
} |
This file contains hidden or 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
#!/usr/bin/python | |
from time import localtime,gmtime, strftime | |
from datetime import date | |
import datetime | |
import os | |
#public static void main argzzz {{{ :D | |
x = int(strftime("%Y")) | |
m = int(strftime("%m")) | |
d = int(strftime("%d")) |
This file contains hidden or 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
var data = { 'sonum' : $('#soid').val() }; | |
$.post('ajax/get_available_roles.php', data, | |
function(postdata) { | |
$("select#roles").html(postdata); | |
},'html'); //returns <op>blahblah</op> | |
This file contains hidden or 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 | |
/** | |
* Database Driver Extension | |
* | |
* DEPENDENCIES: | |
* CodeIgniter 2.x.x (with ActiveRecord turned on) | |
* is_associative() function -- place in autoloaded helper file. It should load early enough before any queries. | |
* | |
* This Extension allows you to insert/update, batch insert/batch update, and delete from any | |
* table within your database simply with an easy interface |
This file contains hidden or 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
if($this->input->post('submit')) | |
{ | |
print_r($_POST); | |
foreach($_POST as $post) | |
{ | |
print $post; | |
} | |
} |
This file contains hidden or 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
--/* | |
--features: | |
-- feature_id feature created modified | |
--*/ | |
--/* | |
--stories: | |
-- story_id story feature_id_fk | |
--*/ | |
-- |
This file contains hidden or 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
i installed xfce4 first using command line (alternate did not load the gnome stuff, used Ctrl+Alt+1 to get to a login screen) | |
//First I ran another update: | |
sudo apt-get update | |
#then installed a basic xfce4 window manager, and the slim login manager. | |
sudo apt-get install xfce4 slim | |
i installed lynx browser,openbox, tint2,sakura and another browser midori, as well as chromium-browser (free opensource browser, basis of google chrome | |
------------------------------------------------------ | |
sudo apt-get install lynx openbox tint2 sakura midori chromium-browser |
This file contains hidden or 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 | |
/* | |
adapted from http://rosstanner.co.uk/2012/01/php-tutorial-twitter-statuses/ | |
*/ | |
class Mytweets extends CI_Model { | |
// define the account username | |
This file contains hidden or 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 | |
exec('ls files/', $output); | |
print_r($output); // $stuff; |
OlderNewer