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
#define RST_PIN 8 | |
#define CHPD_PIN 9 | |
#define DISP_PIN 13 | |
void setup() { | |
//Ouvre le serial vers le pc (serial) et vers l'esp (serial1) | |
Serial.begin(9600); | |
Serial1.begin(115200); | |
//Leonardo: On attend l'ouverture du serial sur le pc avant de continuer | |
while(!Serial); |
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
//Configure pjax | |
new Pjax({ | |
elements: "a", //Quel type d'élément binder pjax (les liens) | |
selectors: ["title", ".mainContent", ".top-nav-menu"], //Quels parties du html doivent changer entre les pages | |
}); | |
//Configure NProgress | |
NProgress.configure({ | |
minimum: 0.1, | |
rickleRate: 0.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 | |
/* | |
* Defaut display of Carbon dates can be changed using the method | |
* This method have to be called BEFORE outputing any date to string | |
*/ | |
\Carbon\Carbon::setToStringFormat('d-m-Y H:i:s'); | |
/* | |
* Can be setup in your models constructors like this: | |
*/ |
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 | |
/************************************************* | |
* API base controller for laravel | |
*************************************************/ | |
class ApiController extends Controller { | |
/** | |
* Create a json Response including errors and no data | |
* @param array $errors the errors | |
* @return responce The responce including error data |
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
echo "Loading ssh file" | |
# Ssh-agent Settings | |
KEY=~/.ssh/id_rsa | |
SSHAGENT=/usr/bin/ssh-agent | |
export SSH_AGENT_PID=$(pgrep ssh-agent | head -1) | |
SSH_AUTH_SOCK=$(ls -1 /tmp/ssh-*/* 2>/dev/null | head -n 1 ) | |
if [[ $(pgrep ssh-agent) == "" ]]; then | |
rm -r /tmp/ssh-* &> /dev/null; | |
eval $($SSHAGENT -s) | |
ssh-add ${KEY} |
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
export default { | |
"default": "Something went wong, please try again later. If the problem persist, please contact support team.", | |
"network": { | |
"default": "Network error, maybe your connection is down. Please try again later.", | |
}, | |
"api": { | |
"default": "Something is wrong on our side, please try again later. If the problem persist, please contact support team", | |
"400": { | |
"default": "$t(errors.api.default)", | |
}, |
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
ntpOnSuccess = function () end | |
function ntpStart(onSuccess, onError) | |
ntpOnSuccess = onSuccess | |
sntp.sync( | |
nil, | |
function(sec, usec, server, info) | |
print("SNTP SYNCED") | |
rtctime.set(sec, usec) |
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# |
OlderNewer