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
{ | |
"data":{ | |
"detections":[ | |
[ | |
{ | |
"language":"es", | |
"isReliable":false, | |
"confidence":0.4517133956386293 | |
}, | |
{ |
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
tail -f log/development.log | grep "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | awk 'match($0,/([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/){ print substr($0, RSTART, RLENGTH) }' |
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
#! /bin/bash | |
# | |
# Author: Pasquale Ceres ([email protected]) | |
# License: GPL ver. 3 | |
# | |
# Script originally developed for the | |
# "San Lorenzo Martire Caposele Church Records Digitalization Project" | |
# | |
# http://www.facebook.com/group.php?gid=188973755117&v=photos |
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
{ | |
"data":{ | |
"detections":[ | |
{ | |
"isReliable":true, | |
"confidence":39.45, | |
"language":"es" | |
}, | |
{ | |
"isReliable":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
#!/bin/sh | |
# | |
MONIK_LISTENER=YOURID | |
MONIK_TOKEN=YOURTOKEN | |
MESSAGE=$@ | |
/opt/monik/monik -c log -l $MONIK_LISTENER -t $MONIK_TOKEN -m "$MESSAGE" |
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
#!/bin/sh | |
# | |
SCHEDULE_CMD="/opt/schedule_acpi_wakeup/schedule_acpi_wakeup.sh" | |
if [ ! -x $SCHEDULE_CMD ]; then | |
echo "$SCHEDULE_CMD not found" | |
exit 1 | |
fi |
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
#!/bin/sh | |
# | |
# Schedule ACPI wakeup | |
# | |
# Author: Laurynas Butkus (laurynas.butkus at gmail.com) | |
# | |
# Some info on ACPI wakeup: | |
# http://smackerelofopinion.blogspot.com/2009/08/acpi-wake-alarm-bugs.html | |
# |
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
# Convert vodafone360 contacts html to VCF | |
require 'rubygems' | |
gem 'nokogiri' | |
gem 'vpim' | |
require 'nokogiri' | |
require 'vpim/vcard' | |
Dir.glob("html/*.html").each do |file| | |
doc = Nokogiri.parse(File.read(file)) |
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
module RenderRemoteHelper | |
# Generate javascript for rendering remote resource | |
# * +url+ - resource url | |
# * +view+ - element id to update | |
def render_remote(url, view = 'remote', options = {}) | |
options[:update] = view | |
options[:url] = url | |
options[:method] = :get | |
render :inline => %{<span id="#{view}"><p>Loading...</p><script |
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
# depends on i18n_multi_locales_form plugin | |
# rails plugin install https://github.com/ZenCocoon/i18n_multi_locales_form.git | |
module MultiLocaleFieldBuilder | |
def multi_locale_field(method, opts = {}) | |
opts = { | |
:type => :text_field | |
}.merge(opts) | |
type = opts.delete(:type) |