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
function goTo(container, idElementTo, duration,last_difference){ | |
if (duration < 0) return; | |
last_difference = typeof last_difference !== 'undefined' ? last_difference : -1; | |
to = document.getElementById(idElementTo); | |
var difference = to.offsetTop - container.scrollTop; | |
var perTick = difference / duration * 10; | |
if (last_difference === difference ) return; |
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
Number.prototype.formatMoney = function(c, d, t){ | |
var n = this, | |
c = isNaN(c = Math.abs(c)) ? 2 : c, | |
d = d || ".", | |
t = t || ",", | |
s = n < 0 ? "-" : "", | |
i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", | |
j = (j = i.length) > 3 ? j % 3 : 0; | |
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: yoel | |
* Date: 8/12/14 | |
* Time: 18:13 | |
*/ | |
namespace App\Helpers; |
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 ($validator->passes()) | |
{ | |
$record = $this->repo->create($data); | |
$image = UploadX::uploadFile($request->file('image'),'notices',$record->id); | |
$record->image = $image['url']; | |
$record->save(); | |
return compact('success','message','record'); | |
} |
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
SHELL=/bin/bash | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games | |
HOME=/ | |
MAILTO="your@mail.com" | |
# Your crons |
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
elasticsearch: | |
image: elasticsearch | |
command: elasticsearch -Des.network.host=_non_loopback_ | |
ports: | |
- "9200:9200" |
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
// Declare internals | |
var internals = { | |
startX: null, | |
startY: null, | |
tap: false | |
}; | |
internals.setTap = function () { | |
internals.tap = true; | |
setTimeout(function () { |
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
# AVIT ZSH Theme | |
PROMPT=' | |
$(_user_host)${_current_dir} $(git_prompt_info) $(_ruby_version) | |
🐑 💨 ' | |
PROMPT2='%{$fg[grey]%}🐑 💨 %{$reset_color%} ' | |
RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 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
docker rmi -f $(docker images | grep none | awk '{print $3}') |
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
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro -v /var/lib/docker:/var/lib/docker martin/docker-cleanup-volumes |
OlderNewer