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
-- Example of how to fix double encoded UTF-8 in mysql with a single mysql query. | |
-- This example assumes that the data has been inserted with NAMES=latin1. | |
-- | |
-- XXX: Do not rely on this to work without testing it. XXX | |
-- | |
-- XXX: If this is run on a column with a UNIQUE index and the COLLATE is | |
-- case-insensitive this might fail. The reason for this is that double-encoded | |
-- upper and lower case chars are considered different but when encoded correctly | |
-- they will be considered the same. |
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
testgist |
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
""" CSS-file formatter | |
Formats CSS-files without merging rules, preserves comments. | |
""" | |
import argparse | |
import cssutils | |
import os | |
import logging | |
SERIALIZER_PREFERENCES = {'indentClosingBrace': False, |
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
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
import play.api.mvc.Results._ | |
import play.api.data._ | |
import play.api.data.Forms._ | |
import play.api.Play.current |
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
# poker app in sinatra+sequel | |
require 'sinatra' | |
require 'sinatra/flash' | |
require 'sinatra/sequel' | |
require "sinatra/reloader" | |
set :database, 'sqlite::memory' | |
enable :sessions | |
enable :logging |
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
# poker app in sinatra+sequel | |
require 'sinatra' | |
require 'sinatra/flash' | |
require 'sinatra/sequel' | |
require "sinatra/reloader" | |
set :database, 'sqlite::memory' | |
enable :sessions | |
enable :logging |
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
# poker app in sinatra+sequel | |
require 'sinatra' | |
require 'sinatra/flash' | |
require 'sinatra/sequel' | |
require "sinatra/reloader" | |
set :database, 'sqlite::memory' | |
enable :sessions | |
enable :logging |
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
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Catalog/Model/Product.php:713 Kiland_Catalog_Model_Product_Type_Configurable_Price:getFinalPrice | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Sales/Model/Quote/Address/Total/Subtotal.php:115 Mage_Catalog_Model_Product:getFinalPrice | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Sales/Model/Quote/Address/Total/Subtotal.php:48 Mage_Sales_Model_Quote_Address_Total_Subtotal:_initItem | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Sales/Model/Quote/Address.php:945 Mage_Sales_Model_Quote_Address_Total_Subtotal:collect | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Sales/Model/Quote.php:1235 Mage_Sales_Model_Quote_Address:collectTotals | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php:1158 Mage_Sales_Model_Quote:collectTotals | |
/Volumes/Projects/vinter/kilandmattor/kilandsmattor/app/code/core/ |
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
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
require 'entry' | |
Safeshare.controllers :entries do | |
get :show, :map => '/entries/:id', :provides => :json, :priority => :low do | |
@entry = Entry[params[:id][1]] | |
error 404 unless @entry | |
# Facebook acl for this post | |
@entry_owner = false | |
if @entry.fb_owner_id |
OlderNewer