Skip to content

Instantly share code, notes, and snippets.

View jbutko's full-sized avatar

Jozef Butko jbutko

View GitHub Profile
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
@jbutko
jbutko / mongo_backup.sh
Created April 6, 2017 07:13 — forked from sheharyarn/mongo_backup.sh
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"
@jbutko
jbutko / pms-development.sh
Created October 22, 2016 14:33 — forked from mrister/pms-development.sh
pm2 example
#!/usr/bin/env bash
#install pm2
npm i pm2
#run with process.json configuration file for development environment
pm2 start process.json --env development
# delete it all
# pm2 delete process.json
@jbutko
jbutko / commands
Last active August 12, 2016 05:53 — forked from Savjee/commands
Jenkins-install-commands
# Install JRE & JDK
sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk
# Download the security key for the Jenkins repository
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
# Add the key to the trusted keys for apt-get
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
// HTML
<div id="ajaxBusy"></div>
// CSS
#ajaxBusy {
display:none;
position: fixed;
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}
/* Media queries for iPhone 3+4 portrait & iPhone 5 portrait */
@media only screen and (min-device-width:241px) and (max-device-width:320px) {
}
/* Media queries for Android (Samsung Galaxy) portrait */
@media only screen and (min-device-width:321px) and (max-device-width:380px) {
}
@jbutko
jbutko / gist:6065493
Created July 23, 2013 19:39 — forked from markdcraftww/gist:5662315
WP, function.php: Register, Deregister & Enqueue scripts short
if (!is_admin()) add_action( 'wp_enqueue_scripts', 'my_jquery_enqueue', 11 );
function my_jquery_enqueue() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery.js', false, null );
wp_enqueue_script( 'jquery' );
}
@jbutko
jbutko / scripts.php
Created June 28, 2013 16:29 — forked from billrobbins/scripts.php
WP, function.php: Register & Enqueue scripts and styles
<?php
// Scripting
// Register various scripts
function organizedthemes_script_register() {
if( !is_admin()){
wp_register_script('vids', get_template_directory_uri() . '/js/fitvids.js', array('jquery'), NULL, true );
wp_register_script('flex', get_template_directory_uri() . '/js/flexslider.js', array('jquery'), NULL, true );
wp_register_script('nanoscroller', get_template_directory_uri() . '/js/nanoscroller.js', array('jquery'), NULL, true );
@jbutko
jbutko / The real HTML5 boilerplate.html
Created May 29, 2013 16:15
HTML, HTML5, Boilerplate: The real HTML5 boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 boilerplate—all you really need…</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>