Skip to content

Instantly share code, notes, and snippets.

@alectoist
alectoist / netstat
Created January 27, 2017 11:49
best netstat ever
sudo netstat -tnlp | grep :80
@alectoist
alectoist / lossy.sh
Last active December 20, 2016 12:48
lossy_compression
find ./ -type f -name "*.jpg" -exec jpegoptim -m70 --strip-all {} \
@alectoist
alectoist / mogrify.sh
Created November 17, 2016 09:23
Mogrify
find ./p/ -name "*[0-9]\.jpg" | while read line; do
mogrify -resize 347x $line
#echo $line|grep 100
#identify $line | grep 100
echo $line
done
@alectoist
alectoist / list.txt
Last active October 28, 2016 07:02
prestashop pull request list
1. /themes/default-bootstrap/modules/loyalty/views/templates/hook/product.tpl:48
2. Improve slider image compression
3. In CMS admin controller, the meta title should be differentiated from the actual title.
4. I also vaguely remember there was some problem with sending mails to the customers from the customer center that stopped to work under certain circumstances.
5. /modules/blocknewproducts/blocknewproducts.php:104
6. In certain cases, adding multiple translations is bonked and no translations are added.
7. https://www.prestashop.com/forums/topic/393218-16011-problem-with-saving-products/page-17
@alectoist
alectoist / ajax.js
Created September 15, 2016 06:02
someajax
$(document).ready(function() {
$('.sendPsc').on('click', function(e) {
e.preventDefault();
var idTextArea = $(this).data('psc');
var messageValue = $('#psc_'+idTextArea).val();
$.ajax({
url: window.location + '?rand=' + new Date().getTime(),
data: {
@alectoist
alectoist / index.js
Created May 31, 2016 18:50
how to load bootstrap into your npm project without NASTY NASTY errors
window.$ = window.jQuery = require('jquery');
const Bootstrap = require('bootstrap-webpack');
Bootstrap.$ = $;
import './assets/styles.less';
@alectoist
alectoist / docker-compose.yml
Created March 14, 2016 19:06
some docker compose things
db:
image: mysql:latest
container_name: bible_mysql
environment:
MYSQL_ROOT_PASSWORD: "admin"
ports:
- 3306
phpmyadmin:
image: corbinu/docker-phpmyadmin
@alectoist
alectoist / Dockerfile
Created March 14, 2016 19:05
best build 2016
FROM webdevops/php-nginx
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
RUN apt-get install -y nodejs && \
npm i -g less handlebars uglifyjs
COPY ./app /app/
@alectoist
alectoist / docker-compose.yml
Created March 13, 2016 10:08
docker things
db:
image: mysql:latest
container_name: bible_mysql
environment:
MYSQL_ROOT_PASSWORD: "admin"
ports:
- 3306
phpmyadmin:
image: corbinu/docker-phpmyadmin
@alectoist
alectoist / tests.js
Last active March 8, 2016 18:14
some casperjs tests
casper.test.begin('Visit the pages of bibleapp', 10, function suite(test) {
casper.start(siteUrl, function(response) {
test.assertEquals(response.status, 200, 'response is 200');
test.assertTitle('Bible Reader', 'the page title is as expected');
test.assertExists('.menu-right', 'menu on the right appears');
test.assertEval(function() {
return $('.navbar-right li').toArray().length === 3;
}, 'there are three elements in the menu on the right');
test.assertExists('.fa-twitter', 'twitter icon displays');
test.assertSelectorHasText('.main-banner h2', 'King James Bible');