Skip to content

Instantly share code, notes, and snippets.

View toofff's full-sized avatar
🙃

Toofff toofff

🙃
View GitHub Profile
.A {
position: relative;
left: 30px;
width: 60px;
height: 91px;
border-bottom: solid 14px #000000;
}
.A:before {
-webkit-transform: skew(-19deg, 0);
-moz-transform: skew(-19deg, 0);
.A {
position: relative;
left: 30px;
width: 60px;
height: 91px;
border-bottom: solid 14px #000000;
}
.A:before {
transform: skew(-19deg, 0);
position: absolute;
@Gregcop1
Gregcop1 / GitAliases
Created February 17, 2015 08:46
Git aliases
# Git Aliases
alias gcl='git clone'
alias ga='git add'
alias gall='git add .'
alias gus='git reset HEAD'
alias gm="git merge"
alias g='git'
alias get='git'
alias gst='git status'
alias gs='git status'
@Gregcop1
Gregcop1 / GitPrompt
Last active August 29, 2015 14:15
Git prompt
# Prompt
git_or_not() { git rev-parse --is-inside-work-tree &> /dev/null ; }
git_branch() {
local status="$(git status --porcelain 2> /dev/null)"
local color=''
if [[ "${status}" != "" ]]; then
color='\033[0;31m'
fi
echo -e "${color}$(git branch 2> /dev/null |grep -e ^* |sed 's/\* //')"
}
@gergelypolonkai
gergelypolonkai / DynarrayConfiguration.php
Created April 27, 2015 08:22
Symfony 2 configuration: array of dynamic associative arrays
<?php
$rootNode
->children()
->arrayNode('state_machine')
->requiresAtLeastOneElement()
->beforeNormalization()
->ifArray()
->then(function($values) {
$ret = array();
@Gregcop1
Gregcop1 / coffee-doco-event.sublime-snippet
Last active August 29, 2015 14:22
Snippet to chain parameters documentation
<snippet>
<content><![CDATA[# @event ${1:name} ${2:description}
#]]></content>
<tabTrigger><![CDATA[#e]]></tabTrigger>
<scope>source.coffee</scope>
</snippet>
@Plou
Plou / Lessc.sublime-build
Last active December 14, 2015 18:58
Build system for less files in sublime-text
{
"cmd": ["lessc", "styles.less", "$file_path/styles.css", "-x"],
"working_dir": "$file_path",
"selector": "source.css.less",
"path": "/home/plou/.nvm/v0.10.4/bin/",
"variants": [
{
"name": "Run",
"cmd": ["lessc", "$file_name", "$file_path/$file_base_name.css", "-x --no-color"],
"working_dir": "$file_path",
@ferodss
ferodss / gist:5762620
Last active April 10, 2016 17:29
Compile Apache 2.4.4 with SSL, FastCGI and PHP 5.4 as FPM on CentOS for Magento store
### ADD RPM Forge repository
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm # Verifies the package
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
### APACHE
# Dependencies
@jasny
jasny / bootstrap-em.less
Last active January 5, 2020 15:36
Use em or rem font-size in Bootstrap 3
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
@GregoireHebert
GregoireHebert / API-Platform-2.6-admin-login.md
Last active February 17, 2021 13:55
How to create a login experience from the admin with API Platform 2.6

Creating a login experience from the Admin with API Platform 2.6

You can use whatever authentication mode you want, but for the sake of the demonstration let's use JWT.

I'll grab a freshly downloaded api-platform distribution.

from the php container :

	composer require jwt-auth
	apk add openssl