-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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
// ==UserScript== | |
// @name jQuery For Chrome (A Cross Browser Example) | |
// @namespace jQueryForChromeExample | |
// @include * | |
// @author Erik Vergobbi Vold | |
// @description This userscript is meant to be an example on how to use jQuery in a userscript on Google Chrome. | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function addJQuery(callback) { |
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
/* | |
* All fields are big endian byte order. | |
* Magic: 9 bytes (0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a) | |
* Version: 2 bytes | |
* Lib version: 2 bytes | |
* Version needed: 2 bytes | |
* Method: 1 byte | |
* Level: 1 byte | |
* Flags: 4 byte |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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 | |
class ActiveRecord::Base | |
# Class method to add destroyable paperclip attachments. | |
# | |
# Example: | |
# has_attached_file :image | |
# has_destroyable_file :image | |
# attr_accessible :image_delete | |
# |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.MediaSource = window.MediaSource || window.WebKitMediaSource; | |
function testTypes(types) { | |
for (var i = 0; i < types.length; ++i) | |
console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i])); | |
} |
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
# The filter_parameter_logging method, used to filter request parameters | |
# (such as passwords) from the log, defines a protected method called | |
# filter_parameter when called. Its existence is later tested using | |
# respond_to?, without the include_private parameter. Due to the respond_to? | |
# behavior change, the method existence is never detected, and parameter | |
# filtering stops working. | |
require 'action_controller' | |
module ParameterFilterPatch | |
def respond_to?(method, include_private = false) |
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
#!/usr/bin/env ruby | |
# | |
# This code snippet shows how to enable SSL in Sinatra+Thin. | |
# | |
require 'sinatra' | |
require 'thin' | |
class MyThinBackend < ::Thin::Backends::TcpServer | |
def initialize(host, port, options) |
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
-- If you have a recent firmware from the dev branch you could do away with that ugly timer | |
-- by relying on WiFi events and (re-)acting accordingly. See wifi.sta.eventMonReg() at | |
-- https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#wifistaeventmonreg | |
-- init all globals | |
... | |
wifiReady = 0 | |
function configureWiFi() |
OlderNewer