Skip to content

Instantly share code, notes, and snippets.

View mariosant's full-sized avatar

Marios Antonoudiou mariosant

View GitHub Profile
@mariosant
mariosant / panel.css
Last active January 18, 2018 15:46
LiveChat plugin placement
.plugins {
width: 300px;
}
.plugins.plugins--maximized {
left: 0;
right: auto;
}
.plugins.plugins--minimized {
left: 0;
@mariosant
mariosant / deploy.sh
Last active May 5, 2017 02:05
Use lftp to deploy Grav websites
#! /bin/bash
./bin/grav clear-cache
lftp -c "open \
-u $FTP_USER,$FTP_PASSWORD $DEST_DOMAIN; \
set ftp:ssl-allow off; \
mirror -R ${HOME}/workspace/ $DEST_DIR \
--exclude .git/ --exclude .c9/ --exclude backup/ \
--delete"
Spree::Alert.class_eval do
def self.current(host)
Hash.new
end
end
@mariosant
mariosant / Vagrantfile
Last active August 29, 2015 14:24
Vagrantfile with rvm and nvm. It uses Fedora 22 libvirt as base, so don't forget to install that first.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "fedora-22"
config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.synced_folder ".", "/vagrant", type: 'nfs'
config.vm.provision "shell", privileged: true, inline: <<-SHELL
dnf install -y which gpgme htop byobu patch libyaml-devel glibc-headers autoconf gcc-c++ glibc-devel patch readline-devel zlib-devel libffi-devel openssl-devel make automake libtool bison sqlite-devel git postgresql-devel
@mariosant
mariosant / index.php
Created May 19, 2014 11:26
Example php redirection
<?php
function redirect($url, $statusCode = 301)
{
header('Location: ' . $url, true, $statusCode);
die();
}
redirect("http://www.malamis.gr");
?>
@mariosant
mariosant / .htaccess
Created May 19, 2014 11:24
Example .htaccess
## Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^malamis.gr[nc]
RewriteRule ^(.*)$ http:## www.malamis.gr/$1 [r=301,nc]
{
"always_prompt_for_file_reload": false,
"always_show_minimap_viewport": false,
"animation_enabled": true,
"atomic_save": true,
"auto_close_tags": true,
"auto_complete": true,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",
#!/bin/sh
# Sublime Text 3 install with Package Control
# http://simonewebdesign.it/blog/install-sublime-text-3-on-fedora-20/
# Run this script with:
# $ curl LINK_TO_THIS_SCRIPT | sh
curl -o ~/st3.tar.bz2 http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x32.tar.bz2