Skip to content

Instantly share code, notes, and snippets.

View chrismear's full-sized avatar
😸

Chris Tucker Mear chrismear

😸
View GitHub Profile
def replace_things(string)
string = string.gsub(/lice/, 'dam')
end
def alter_things(string)
string.gsub!(/lice/, 'dam')
end
person = "Alice"
main(a){float x,i,j,t,y;for(y=-30;y<30;puts(""),y++)for(x=-120;x<60;putchar(" ."[a>>6]),x++)for(i=j=a=0;i*j<2&&a<64;t=i*i-j*j+x/60,j=2*i*j+y/30,i=t)a++;}
<pre>
<?php
echo("POST variables:\n");
print_r($_POST);
echo("\nGET variables:\n");
print_r($_GET);
if ( $_SERVER['REQUEST_METHOD'] === 'POST' )
{
echo("Raw POST:\n");
echo(trim(file_get_contents('php://input')));
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvs3Lyfre2ghiC20qjizZYt3j5nbsn+h8u1Ped9OP+GDRQtiUXKNmoiY1dKo0yFWXJ0XayObzuO8CuNhwMKMkYwR2nBSe/nGddB3YPHqXPUF1Of3LEwwGY3+T1YX4Mpjr6Gcv9mY9mIZXSDWkjySKLcbbtG1JJwNBKUWwgdE63esGCBT6sALBwr8JL7W5wbPRvI+LrrrqN5ejrbMuyvOw94ya5rRgiQrpjTdDVwEb76+WcXpMZ9061NwF+DNXJNvMsqNSCURE5uTV+84l2MBjefYNF4Q1wKzzYz/Vf+Et7ZNz5TJlWeXObhyNPJSiSEEszs6IKoR/1YgIaAAY30QqRQ== chris@parker.config
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
<iframe src="https://www.google.com/calendar/embed?showCalendars=0&amp;mode=AGENDA&amp;height=600&amp;wkst=2&amp;bgcolor=%23FFFFFF&amp;src=oneclickorgs.com_bnkv9s6lv6ni40t45hpfr4i9a0%40group.calendar.google.com&amp;color=%230D7813&amp;ctz=Europe%2FLondon" style=" border-width:0 " width="530" height="600" frameborder="0" scrolling="no"></iframe>
org = Organisation.create(:oisodfin)
org.active!
org.members.create(
:first_name => "",
:last_name => "",
:email => "",
:member_class => org.member_classes.find_by_name("Member")
)
def can_view?(list)
return true if list.user.id == current_user.id
return false if list.list_type == List::PRIVATE
return true
end
Warning: /Library/Frameworks/Mono.framework detected
This can be picked up by CMake's build system and likely cause the build to
fail. You may need to move this file out of the way to compile CMake.
# Copyright (c) 2009, 2013 Chris Mear <chris@feedmechocolate.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR