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 | |
Host=localhost | |
BDir=~/backup/mysql | |
read -p "User: " user | |
read -s -p "Pass: " pass | |
Dump="/usr/local/bin/mysqldump --skip-extended-insert --force" | |
MySQL=/usr/local/bin/mysql |
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
In the example solr project when you start it up by calling the following line: | |
java -jar start | |
You are starting a Jetty server on your local machine that's going to serve the solr results. This server is not able to do CORS (Cross Origin Resource Sharing). Which means that if you tried to do an AJAX call from a webpage of a different origin than the server itself you would be denied a response. | |
To fix this you first need to get the apropriate jars to allow for cross-domain resource sharing. | |
I used the following jar: | |
http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets/8.1.10.v20130312/ |
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
require 'hirb' | |
Hirb.enable | |
old_print = Pry.config.print | |
Pry.config.print = proc do |output, value| | |
Hirb::View.view_or_page_output(value) || old_print.call(output, value) | |
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
(defun custom-color--choose-action (widget &optional _event) ; this function is only needed if you want to use color-picker in Easy Customization | |
"customize `widget-color--chose-action' to not split the screen" | |
(list-colors-display | |
nil nil | |
`(lambda (color) | |
(when (buffer-live-p ,(current-buffer)) | |
(widget-value-set ',(widget-get widget :parent) color) | |
(pop-to-buffer ,(current-buffer)))))) | |
(defun nscolor2hex (color) |
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 purchaseItems = [ | |
{ | |
"id":128449, | |
"name":"Yellow Banana", | |
"product_id":103672, | |
"product_name":"Bananas", | |
"purchase_date":"2014-02-09 00:00:00", | |
"dvp_value":5.6, | |
"nutrient_rate":124.0 | |
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 two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |
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
# This should be placed in /etc/sysctl.conf file so these | |
# settings are available on system reboot. After change | |
# execute: | |
# | |
# sudo service procps start | |
# | |
# To check values execute: | |
# | |
# sudo cat /proc/sys/net/ipv4/tcp_keepalive_time | |
# |
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
sh-3.1$ make test-all | |
./miniruby.exe -I../../../ruby-git/lib -I. -I.ext/common ../../../ruby-git/tool/runruby.rb --extout=.ext -- --disable-gems "../../../ruby-git/test/runner.rb" --ruby="./miniruby.exe -I../../../ruby-git/lib -I. -I.ext/common ../../../ruby-git/tool/runruby.rb --extout=.ext -- --disable-gems" | |
d:/projects/ruby/ruby-git/test/cgi/test_cgi_session.rb: 193: %1 is not a valid Win32 application. - d:/projects/ruby/rubyinstaller/sandbox/ruby19_build/.ext/i386-mingw32/digest/md5.so | |
d:/projects/ruby/ruby-git/test/net/http/test_buffered_io.rb: 193: %1 is not a valid Win32 application. - d:/projects/ruby/rubyinstaller/sandbox/ruby19_build/.ext/i386-mingw32/digest/md5.so | |
d:/projects/ruby/ruby-git/test/net/http/test_http.rb: 193: %1 is not a valid Win32 application. - d:/projects/ruby/rubyinstaller/sandbox/ruby19_build/.ext/i386-mingw32/digest/md5.so | |
d:/projects/ruby/ruby-git/test/net/http/test_https.rb:13:in `<class:TestNetHTTPS>': uninitialized constant TestNetHTTPS::TestNetHTTPUtils (NameErro |
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
# Running tests: | |
[ 611/11297] OpenSSL::TestConfig#test_constants = 0.00 s | |
1) Failure: | |
test_constants(OpenSSL::TestConfig) [D:/projects/ruby/ruby-git/test/openssl/test_config.rb:22]: | |
Exception raised: | |
<#<Errno::ENOENT: No such file or directory - C:/Users/Luis/Projects/oss/knapsack.old/knap-build/var/knapsack/software/x86-windows/openssl/1.0.0j/ssl/openssl.cnf>>. | |
[ 3179/11297] TestDir_M17N#test_filename_euc_jp = 0.14 s | |
2) Failure: |
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
D:/projects/ruby/ruby-git/test/syslog/test_syslog_logger.rb: cannot load such file -- syslog/logger (LoadError) | |
D:/projects/ruby/ruby-git/lib/test/unit.rb:534:in `load': undefined class/module WIN32OLERuntimeError (ArgumentError) | |
from D:/projects/ruby/ruby-git/lib/test/unit.rb:534:in `block in _run_parallel' | |
from D:/projects/ruby/ruby-git/lib/test/unit.rb:503:in `each' | |
from D:/projects/ruby/ruby-git/lib/test/unit.rb:503:in `_run_parallel' | |
from D:/projects/ruby/ruby-git/lib/test/unit.rb:651:in `_run_suites' | |
from D:/projects/ruby/ruby-git/lib/minitest/unit.rb:792:in `_run_anything' | |
from D:/projects/ruby/ruby-git/lib/minitest/unit.rb:981:in `run_tests' | |
from D:/projects/ruby/ruby-git/lib/minitest/unit.rb:968:in `block in _run' |
NewerOlder