Skip to content

Instantly share code, notes, and snippets.

View ifthenelse's full-sized avatar
🏎️
LIFE BE LIKE

Andrea Collet ifthenelse

🏎️
LIFE BE LIKE
View GitHub Profile
@ifthenelse
ifthenelse / gist:7925614
Created December 12, 2013 09:53
Impostazioni di esportazione dei dump mySQL di phpMyadmin
Tabella
@SERVER@-@DATABASE@-@TABLE@-%Y%m%d-%H%M%S
Database
@SERVER@-@DATABASE@-%Y%m%d-%H%M%S
Server
@SERVER@-%Y%m%d-%H%M%S
{
"folders": [{
"follow_symlinks": true,
"path": "www/htdocs",
// folder_exclude_patterns and file_exclude_patterns control which files
// are listed in folders on the side bar. These can also be set on a per-
// project basis.
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", ".sass-cache", "vendor/", "app/storage/cache/", "app/storage/logs/", "docs/"],
"file_exclude_patterns": ["*.sublime-*", "*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj", "*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.scssc"],
// These files will still show up in the side bar, but won't be included in
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Page title</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
@ifthenelse
ifthenelse / Show---Hide-full-size-divs-with-translate.markdown
Last active August 25, 2017 09:16
Hide and show full size DIV containers with CSS3 transitions on translate, rather than top, right, bottom, or left offset.

Show / Hide full size divs with translate

Hide and show full size DIV containers with CSS3 transitions on translate, rather than top, right, bottom, or left offset.

A Pen by Andrea Collet on CodePen.

License.

@ifthenelse
ifthenelse / post-checkout
Last active August 29, 2015 14:04
A hook script to switch between parameters files when checking out different branches of the same Symfony2 repo
#!/bin/sh
#
# A hook script to switch between parameters files when checking out different branches of the same Symfony2 repo
#
# To enable this hook, rename this file to "post-checkout".
PREVIOUS_HEAD=$1
NEW_HEAD=$2
BRANCH_SWITCH=$3
@ifthenelse
ifthenelse / sticky.js
Last active August 29, 2015 14:10 — forked from chriskoelle/sticky.js
Add an affix behavior to an element, by keeping it sticky between 2 elements.
;(function($) {
$.fn.extend({
stickyWidget: function(options) {
// Exit if there are no elements to avoid errors:
if (this.length === 0) {
return this;
}
var settings = $.extend({
@ifthenelse
ifthenelse / st3-sf2-template.sublime-project
Last active June 11, 2018 07:50
Sublime Text 3 project file template for Symfony2
{
"folders":
[
{
"follow_symlinks": true,
"path": "/",
"folder_exclude_patterns": [
".sass-cache",
"app/cache",
"bin",
@ifthenelse
ifthenelse / _equal-display-inline-block-width.scss
Created May 14, 2015 15:04
Dynamically set inline-block elements equal width based on items length
@for $i from 1 through 10 {
/* #{$i} item(s) */
.box-ballooned-item:first-child:nth-last-child(#{$i}),
.box-ballooned-item:first-child:nth-last-child(#{$i}) ~ .box-ballooned-item {
max-width: floor(100% / $i);
}
}
{
"folders":
[
{
"follow_symlinks": true,
"path": ".",
"folder_exclude_patterns": [
".sass-cache",
".bundles",
"node_modules",
@ifthenelse
ifthenelse / shell_snippets.sh
Created July 7, 2015 13:15
List of shell snippets
# Assuming the existence of a list of url, in a text file, get the file size of each url target (in Kb)
cat urls.txt | xargs -n 1 curl -sI | grep Content-Length | awk '{print $2/1000}'