Skip to content

Instantly share code, notes, and snippets.

View bgruszka's full-sized avatar

Blazej Gruszka bgruszka

View GitHub Profile
@bgruszka
bgruszka / global-gitignore.md
Created July 15, 2018 09:07 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -s escape-time 1
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
@bgruszka
bgruszka / accordion.html
Last active October 19, 2017 06:42
Bootstrap - JS Components
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
Element 1
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
@bgruszka
bgruszka / index.html
Last active October 3, 2017 06:38
push left menu using HTML + CSS only
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Push left menu</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
@bgruszka
bgruszka / index.html
Created October 3, 2017 05:35
RWD slide menu using only HTML + CSS
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Only Navigation Menu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<label for="show-menu" class="show-menu">Show Menu</label>
@bgruszka
bgruszka / sudoku_solver.py
Created July 2, 2017 09:25
sudoku solver using backtracking algorithm
def print_grid(grid):
for i in range(9):
for j in range(9):
print(grid[i][j], end="")
print('\n')
def find_empty_location(grid):
for row in range(9):
for column in range(9):
if grid[row][column] == 0:
  • vagrant up

  • vagrant ssh

  • sudo -i

  • pip install ansible

  • pip install lxc-python2

  • lxc-create -n db1 -t ubuntu

  • lxc-start -n db1 -d

  • lxc-create -n web1 -t ubuntu

@bgruszka
bgruszka / gist:487d6e0ad12e39b5251952f1a8ac6285
Created August 31, 2016 07:02 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@bgruszka
bgruszka / convert.php
Last active August 29, 2015 14:26 — forked from dantleech/convert.php
Script to convert symfony YAML translation file to XLIFF
<?php
// Script to convert Symfony YAML translation files to XLIFF.
//
// Will add a .xliff version of the given file in its directory.
//
// $ php convert.php path/to/MyBundle.en.yml
$file = $argv[1];