This file contains hidden or 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
#!/bin/bash -e | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <instance-id> <volume-size-gb> [PARITION_NAME=/dev/xvda2]" | |
exit 2 | |
fi | |
sudo apt-get install jq -y |
This file contains hidden or 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
stages: | |
- deploy | |
build: | |
stage: deploy | |
environment: | |
name: production | |
image: mwienk/docker-lftp:latest | |
script: | |
- mv .htaccess-dist .htaccess |
This file contains hidden or 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
-- Adminer 4.6.3 PostgreSQL dump | |
DROP TABLE IF EXISTS "venues"; | |
DROP SEQUENCE IF EXISTS venues_id_seq; | |
CREATE SEQUENCE venues_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; | |
CREATE TABLE "public"."venues" ( | |
"id" integer DEFAULT nextval('venues_id_seq') NOT NULL, | |
"phone_number" text NOT NULL, | |
"name" text NOT NULL, |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# fix one domain name with HTTPS | |
# | |
RewriteCond %{HTTP_HOST} ^studioartcz.cz [NC] | |
RewriteRule ^(.*)$ https://www.studioart.cz/$1 [L,R=301] | |
# fix for poor hosting without www_root setup | |
# |
This file contains hidden or 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
#!/bin/bash | |
# check environment | |
UNAME=$(uname) | |
if [[ "$UNAME" == "Linux" ]] ; then | |
echo "Okay, you have Linux, everything should be fine." | |
elif [[ "$UNAME" == "Darwin" ]] ; then | |
echo "Warning for MacOS user: This JavaBox is tested only on Ubuntu Linux." | |
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then |
This file contains hidden or 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
#!/bin/bash | |
echo "Enter the VirtualHost name : " | |
read name | |
echo "Enter the VirtualHost root [/var/www/html/] : " | |
read root | |
if [ -d "/var/www/html/"$root ] | |
then | |
if [ -w /etc/hosts ] | |
echo "creating apache virtial host..." |
This file contains hidden or 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
/** | |
* @todo: remove e argument somehow | |
* @param e this - context | |
* @param elementId - target element id | |
*/ | |
function switchContent(e, elementId) | |
{ | |
var another_links = e.parentNode.children; | |
for(var l = 0; l < another_links.length; l++) | |
{ |
This file contains hidden or 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
let gulp = require('gulp'), | |
replace = require('gulp-batch-replace'), | |
filesExist = require('files-exist'); | |
gulp.task('bt4', () => | |
{ | |
let diff = { | |
'@media (min-width: $screen-xs-min) and (max-width: $screen-sm-max)': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, xs))', | |
'@media (min-width: $screen-xs) and (max-width: ($screen-md-min - 1))': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, md)-1)', |
This file contains hidden or 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 | |
class RandomClass | |
{ | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: |