Skip to content

Instantly share code, notes, and snippets.

View martisj's full-sized avatar
🐊

Martin Sjåstad martisj

🐊
View GitHub Profile
@martisj
martisj / dabblet.css
Created December 17, 2012 05:06
Icons getting cut off
/* Icons getting cut off*/
span.event-type
{
color: #6c6c6c;
}
.event_heading{
color: #ffffff;
background-color: #464646;
margin: 15px -26px 0 -24px;
@martisj
martisj / memcacheerr
Created December 14, 2012 06:28
memcache error
<b>Warning</b>: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/memcached.so' - dlopen(/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/memcached.so, 9): Library not loaded: /usr/local/lib/libmemcached.10.dylib
Referenced from: /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/memcached.so
Reason: image not found in <b>Unknown</b> on line <b>0</b><br />
<br />
@martisj
martisj / dabblet.css
Created December 11, 2012 12:45
The first commented line is your dabblet’s background: #f06;#borders {
/**
* The first commented line is your dabblet’s background: #f06;#borders {
}
#borders
{
position: relative;
border: 5px solid #f00;
}
@martisj
martisj / root_htaccess
Created November 25, 2012 22:31
root htaccess
# AddHandler php-legacy .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@martisj
martisj / htaccess
Created November 25, 2012 22:27
messed up htaccess
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteEngine On
RewriteBase /
#For martinsjastad.com
# automatically redirect user to www.martinsjastad.com
RewriteCond %{HTTP_HOST} !^www\.martinsjastad\.com [NC]
RewriteRule ^(.*) http://www.martinsjastad.com/$1 [L,R=301]
@martisj
martisj / slideshow-gallery-pro.php
Created November 24, 2012 00:16
enqueue script hooks
@martisj
martisj / gist:3976938
Created October 29, 2012 22:24
random balloon spawner
function spawnRandomBalloons(te:TimerEvent):void
{
var balloons:Array = [new mcBalloonPink(), new mcBalloonGreen(), new mcBalloonRed()];
var rndm:int = Math.floor(Math.random() * 3);
trace(balloons[rndm]);
trace(balloons);
var theBalloon = balloons[rndm];
theBalloon.x = 450;
@martisj
martisj / notificationevent.php
Created September 21, 2012 07:34
meat poopsicle
private function _compare_timetable_events(models\Calendar $event_one, models\Calendar $event_two)
{
if ($event_one->getUnit_id() == $event_two->getUnit_id()
&& $event_one->getType() == $event_two->getType()
&& $event_one->getClass_type() == $event_two->getClass_type()
&& $event_one->getTime_from() == $event_two->getTime_from()
&& $event_one->getTime_to() == $event_two->getTime_to()
&& $event_one->getTime_day() == $event_two->getTime_day()
)
{
private function send_timetable_add_class($event, $calendar)
{
echo "send_timetable_add_class <br/>";
$user_from = $event->get_user();
$unit_info_id = $calendar->getUnit_info_id();
$qb = repo('Activity')->createQueryBuilder('a');
$qb->where('a.user_from_id = :ufid')
->andWhere('a.type = :type')
# RewriteEngine on
# RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
# RewriteRule ^(.*)$ index.php/$1 [L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
### Canonicalize codeigniter URLs