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
mysql --user=root --password=xxx -Bse "select CONCAT('ALTER TABLE ', table_schema,'.', table_name,' ENGINE=NDBCLUSTER;') from information_schema.tables where table_schema='tchv2';" | mysql --user=root --password=xxx | |
ERROR 157 (HY000) at line 1: Could not connect to storage engine |
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
array_paths_removed=() | |
i=0 | |
for paths in ${array_paths[@]} | |
do | |
array_paths_removed[i]=${paths%/*} | |
i=i+1 | |
done |
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
a='https://example.com/test/test2' | |
b=${a%/*} | |
echo $b | |
------- | |
# echo output: | |
https://example.com/test | |
#what I now need would be result: | |
test2 |
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
raw_config = File.read(File.expand_path('../config.yml', __FILE__)) | |
APP_CONFIG = YAML.load(raw_config)[Rails.env] |
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
>>> vatnumber.check_vies('IT16145131') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/pymodules/python2.6/vatnumber.py", line 1098, in check_vies | |
server = WSDL.Proxy(VIES_URL) | |
File "/usr/lib/pymodules/python2.6/SOAPpy/WSDL.py", line 62, in __init__ | |
self.wsdl = reader.loadFromStream(stream, wsdlsource) | |
File "/usr/lib/pymodules/python2.6/SOAPpy/wstools/WSDLTools.py", line 28, in loadFromStream | |
document = DOM.loadDocument(stream) | |
File "/usr/lib/pymodules/python2.6/SOAPpy/wstools/Utility.py", line 602, in loadDocument |
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
## OWL snippet | |
<owl:ObjectProperty rdf:about="&evoonto;affectsPDO"> | |
<rdfs:comment rdf:datatype="&xsd;string">PDO affected by the PDO change.</rdfs:comment> | |
<rdfs:domain rdf:resource="&evoonto;Evolution"/> | |
<rdfs:range rdf:resource="&evoonto;PDO"/> | |
</owl:ObjectProperty> | |
## RDF "Triple" snippet |
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
img = Magick::Image.read(folder + "/" + count.to_s).first | |
suffix = img.format | |
identify -list format | grep png | |
See http://www.libpng.org/pub/mng/ for details about the JNG | |
MNG* PNG rw+ Multiple-image Network Graphics (libpng 1.2.46) | |
See http://www.libpng.org/pub/mng/ for details about the MNG | |
PNG* PNG rw- Portable Network Graphics (libpng 1.2.46) | |
See http://www.libpng.org/ for details about the PNG format. |
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
1.9.3-p0 :002 > doc = Nokogiri::XML(open('http://sports.yahoo.com/top/rss.xml')) | |
Errno::ENOENT: No such file or directory - http://sports.yahoo.com/top/rss.xml | |
from (irb):2:in `initialize' | |
from (irb):2:in `open' | |
from (irb):2 |
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
cat /home/openerp/virtualenv/erp_6_1_1/bin/activate | |
# This file must be used with "source bin/activate" *from bash* | |
# you cannot run it directly | |
deactivate () { | |
if [ -n "$_OLD_VIRTUAL_PATH" ] ; then | |
PATH="$_OLD_VIRTUAL_PATH" | |
export PATH | |
unset _OLD_VIRTUAL_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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: openerp-server | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |