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
I restored a backup from production locally and tried to just move things and hit admin/modules or to run registry_rebuild() but it didn't stop fatal errors from being thrown. This makes sense to me since some modules may use includes or whatever in their hook_init(), or you may have a menu router path set that depends on a module or include that Drupal can't find on bootstrap. Ultimately, this is what I did (your paths may be different): | |
Step 1: Replace sites/all/modules with sites/all/modules/contrib | |
UPDATE system SET filename = REPLACE(filename, 'sites/all/modules', 'sites/all/modules/contrib'); | |
UPDATE registry SET filename = REPLACE(filename, 'sites/all/modules', 'sites/all/modules/contrib'); | |
UPDATE registry_file SET filename = REPLACE(filename, 'sites/all/modules', 'sites/all/modules/contrib'); | |
Step 2: Replace sites/all/modules/contrib with sites/all/modules/custom for custom namespaced modules | |
UPDATE system SET filename = REPLACE(filename, 'sites/all/modules/contrib', 'sites/all/modules/custom') WHER |
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
label | |
input#test-checkbox type="checkbox" | |
|Test checkbox | |
table#test-table | |
javascript: | |
$(document).ready(function() { | |
var table = $("#test-table").dataTable( { | |
"ajaxSource": '#{test_datatable_path}', |
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
#!/home/RUBYUSER/.rvm/rubies/ruby-2.3.0/bin/ruby | |
require 'rubygems' | |
require 'rb-inotify' | |
require 'slack-notifier' | |
watcher = INotify::Notifier.new | |
notifier = Slack::Notifier.new "https://hooks.slack.com/services/SLACKWEBHOOKURL" | |
notifier.channel = '#CHANNEL_NAME' |
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 puma | |
# The directory to operate out of. | |
# | |
# The default is the current directory. | |
# | |
# directory '/u/apps/lolcat' | |
# Use an object or block as the rack application. This allows the | |
# config file to be the application itself. |
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
def luhn(code) | |
(code | |
.chars # Break into individual digits | |
.map(&:to_i) # map each character by calling #to_i on it | |
.reverse # Start from the end | |
.map.with_index { |x, i| i.odd? ? x * 2 : x } # Double every other digit | |
.map { |x| x > 9 ? x - 9 : x } # If > 9, subtract 9 (same as adding the digits) | |
.inject(0, :+) % 10).zero? # Check if multiple of 10 | |
end |
OlderNewer