Skip to content

Instantly share code, notes, and snippets.

View InvisibleKind's full-sized avatar

Viktor Livakivskyi InvisibleKind

  • Leonberg, Germany
View GitHub Profile
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@gestj
gestj / connect.bitbucket.commit.groovy
Last active December 16, 2015 18:57
Script for jenkins scriptler plugin (works with Jenkins v1.572)
import groovy.json.*
import hudson.model.*
import static groovy.json.JsonOutput.*
import java.util.logging.*
import java.security.MessageDigest
class Bitbucket {
def static BITBUCKET_REST_URL = "https://bitbucket.org"
def static BITBUCKET_API_URL = BITBUCKET_REST_URL + "/api/2.0/"
def static LOGGER = Logger.getLogger("connect.bitbucket.commit.groovy.Bitbucket")
@wolffc
wolffc / dump_database_and_reimport_as_utf8.sh
Created December 9, 2014 10:35
Exports a dump as latin1 and reimport it as utf8 (no convertsion done) this script is usefull if you have allready written utf-8 data to latin1 tables.
#!/bin/bash
## This script Converts the Typo3 Database to the Correct encoding
## by Exporting the database converting it and importing it agaion;
## CONFIGURATION:
DATE=$(date +"%Y%m%d%H%M")
FILENAME="temp_mysqldump_for_utf8conversion_$DATE.sql"
if [ -n "$1" ] || [-n "$2"]
then
echo "Create dump"
@wolffc
wolffc / t3x-convert-character-set-to-utf8.sh
Created December 9, 2014 10:31
Convert an typo3 database to utf-8
#!/bin/bash
#
# Creates a backup of a database in mirgrates every table to UTF-8 Including Collation
# written by christian Wolff cwolff@aer.de
## Configuration
DB_USER=$1
DB_PASS=$2
DB_NAME=$3
@helhum
helhum / FormErrorsPartial.html
Created October 21, 2014 15:28
Ordered validation results
<f:form.validationResults for="{propertyPath}">
<f:if condition="{validationResults.flattenedErrors}">
<ul>
<f:for each="{validationResults.flattenedErrors}" as="errors">
<li>
<ul>
<f:for each="{errors}" as="error"><li>{error}</li></f:for>
</ul>
</li>
</f:for></ul>
@ReedD
ReedD / ec2-startup.sh
Last active July 18, 2024 16:04
User data for EC2 to set up Docker and Compose (Fig) for ec2-user
#!/bin/sh
export PATH=/usr/local/bin:$PATH;
yum update
yum install docker -y
service docker start
# Docker login notes:
# - For no email, just put one blank space.
# - Also the private repo protocol and version are needed for docker
# to properly setup the .dockercfg file to work with compose
@six0h
six0h / post-update
Created February 26, 2014 17:12
Git Post-Update hook that checks for changes to composer.lock, and fires a composer install if required.
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""A post-update Git hook to execute `composer install` when composer.json changes
:Author: Cody Halovich
:Company: HootSuite Media Inc.
"""
import subprocess
@greypants
greypants / data-track.md
Created December 18, 2012 21:55
GA: data-track attribute pattern

Basic Tracking

data-track

To add basic event tracking to an element on the page, add this attribute with the appropriate values you'd like to send, separated by pipes |.

<button data-track="category|action|opt_label|opt_value|opt_noninteraction">
	Basic Tracking
</button>

Optional attributes

<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>General</sheetTitle>
</TCEforms>