Skip to content

Instantly share code, notes, and snippets.

View bogdandynamic's full-sized avatar
💭
Enjoying life

Bogdan Anghel bogdandynamic

💭
Enjoying life
View GitHub Profile
@bogdandynamic
bogdandynamic / conf.conf
Created October 11, 2016 21:25
Nginx rewrite (remove / from the end of the url)
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location /SUBFOLDER/ {
index index.php;
try_files $uri $uri/ /SUBFOLDER/index.php?$args;
}
@bogdandynamic
bogdandynamic / reCaptchaValidation.js
Last active October 5, 2016 09:14
Google reCaptcha js validation
if(recaptchaRegister !== null && recaptchaRegister !== 'undefined'){
var resp = grecaptcha.getResponse(recaptchaRegister);
if(resp === null || resp === ""){
alert('Captcha not completed');
}
}
}
@bogdandynamic
bogdandynamic / vertical-aligned-cells.html
Created September 28, 2016 09:57
Make adjacent cells same height and vertical align content in both
<style type="text/css">
.row {
display: table;
}
.row [class*="col-"] {
float: none;
display: table-cell;
vertical-align: top;
}
</style>
@bogdandynamic
bogdandynamic / move-all-subfolder-files.sh
Last active October 5, 2016 09:14
Linux commands: Move all files in subfolders to parent folder
find . -mindepth 2 -type f -print -exec mv {} . \;