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 |
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-web | |
# 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 |
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
thebod:~/Dropbox/fib_c$ wc -c fib.c | |
98 fib.c | |
thebod:~/Dropbox/fib_c$ cat fib.c | |
f(x){return x>1?f(x-1)+f(x-2):x;}main(int i,int**v){for(i=0;i<atoi(v[1]);)printf("%i\n",f(i++));} | |
thebod:~/Dropbox/fib_c$ gcc -o fib fib.c | |
fib.c: In function ‘main’: | |
fib.c:1: warning: incompatible implicit declaration of built-in function ‘printf’ | |
thebod:~/Dropbox/fib_c$ ./fib 10 | |
0 | |
1 |
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 [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi | |
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}:%{$fg[blue]%}%0~%{$reset_color%}$(git_prompt_info)%(!.#.$) ' | |
RPROMPT='[%*] %{$fg[blue]%}%m%{$reset_color%}' | |
# git theming | |
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[blue]%})%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}!" |
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
print 10-sum([sum(map(int,str(int(v)*(2-k%2)))) for k,v in enumerate("271828182845856")])%10 |
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
<?php | |
// [...] | |
/** | |
* pregenerate missing attribute options | |
* | |
* @param array $products | |
*/ | |
public function pregenerateAttributeOptions($products) |
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
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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": { | |
"connect20/mage_all_latest": "1.7.*" | |
}, | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "http://packages.firegento.com/" | |
} | |
], |
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
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: |
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
<?php | |
// put in magento root folder | |
// run via | |
// rm /tmp/magento; php persistent.php | |
// output is in /tmp/magento.log | |
function plog($msg) { | |
file_put_contents('/tmp/magento.log', date('H:i:s') . ': ' . $msg . PHP_EOL, FILE_APPEND); | |
} |
OlderNewer