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
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
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
# encoding: utf-8 | |
require "active_record" | |
#require "activerecord-jdbcsqlite3-adapter" # gem install this, but not require | |
require 'activerecord-jdbc-adapter' | |
# a very basic migration | |
class CreateSamplesTable < ActiveRecord::Migration | |
def change | |
create_table :samples do |t| |
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
# encoding: utf-8 | |
require "active_record" | |
#require "activerecord-jdbcsqlite3-adapter" # gem install this, but not require | |
require 'activerecord-jdbc-adapter' | |
# a very basic migration | |
class CreateSamplesTable < ActiveRecord::Migration | |
def change | |
create_table :samples do |t| |
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
C:\Users\Fox\Dropbox\projects\NewsFisher\Concept>jruby sqlite_in_memory.rb | |
ActiveRecord::JDBCError: The driver encountered an unknown error: opening db: ':memory:?cache=shared': Die Syntax f³r den Dateinamen, Verzeichnisnamen oder die Datentrõgerbezeichnung ist falsch | |
initialize at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-1.2.5/lib/arjdbc/jdbc/connection.rb:88 | |
initialize at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-1.2.5/lib/arjdbc/jdbc/adapter.rb:31 | |
jdbc_connection at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-1.2.5/lib/arjdbc/jdbc/connection_methods.rb:6 | |
sqlite3_connection at c:/jruby-1.7.2/lib/ruby/gems/shared/gems/activerecord-jdbc-adapter-1.2.5/lib/arjdbc/sqlite3/connection_methods.rb:17 | |
__send__ at org/jruby/RubyBasicObject.java:1665 | |
send at org/jruby/RubyKernel.java:2090 |
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
get '/test.gif' do | |
content_type 'image/gif' | |
"GIF89a\1\0\1\0%c\0\0%c%c%c\0\0\0,\0\0\0\0\1\0\1\0\0%c%c%c\1\0;" % [144, 153, 0, 0, 2, 2, 4] | |
end |
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
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
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
<snippet> | |
<content><![CDATA[ | |
console.log(" /"); | |
console.log(" .7"); | |
console.log(" \\\ , //"); | |
console.log(" |\\\.--._/|//"); | |
console.log(" /\\\ ) ) ).'/"); | |
console.log(" /( \\\ // /"); | |
console.log(" /( J`((_/ \\\"); | |
console.log(" / ) | _\\\ /"); |
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
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
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
function encrypt(text){ | |
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
var crypted = cipher.update(text,'utf8','hex') | |
crypted += cipher.final('hex'); | |
return crypted; | |
} | |
function decrypt(text){ | |
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
var dec = decipher.update(text,'hex','utf8') |
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
METEOR CORE: | |
Anywhere: Meteor.isClient | |
Anywhere: Meteor.isServer | |
Anywhere: Meteor.startup(func) | |
Anywhere: Meteor.absoluteUrl([path], [options]) | |
Anywhere: Meteor.settings | |
Anywhere: Meteor.release | |
OlderNewer