Skip to content

Instantly share code, notes, and snippets.

Alfred Bez alfredbez

Block or report user

Report or block alfredbez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alfredbez
alfredbez / README.md
Last active Nov 23, 2016 — forked from Im0rtality/README.md
PHP CLI Debugging in Vagrant using Xdebug and PHPStorm
View README.md

In host:

  1. Go to PHPStorm Settings > Project settings > PHP > Servers
  2. Add server with following parameters:
    • Name: vagrant (same as serverName= in debug script)
    • Host, port: set vagrant box IP and port
    • Debugger: Xdebug
    • [v] Use path mappings
    • Map your project root in host to relative dir in guest
    • Hit OK
View keybase.md

Keybase proof

I hereby claim:

  • I am alfredbez on github.
  • I am alfredbez (https://keybase.io/alfredbez) on keybase.
  • I have a public key whose fingerprint is B99D 5003 3459 26BD 13DB 91E0 10F9 D95A 4DDB 2313

To claim this, I am signing this object:

View .vimrc
" This must be first, because it changes other options as side effect
set nocp
""""""""""""""""""""""""""
" pathogen init
""""""""""""""""""""""""""
execute pathogen#infect()
syntax on
filetype plugin indent on
@alfredbez
alfredbez / pre-commit
Created Apr 24, 2015
Deploy with git, rsync & gulp
View pre-commit
#!/bin/sh
### Are any Sass files canged or added?
if git status -s | grep '^M.\+s[ac]ss$'
then
gulp --cwd path/to/gulpfile css
fi
### Are any JS files canged or added?
if git status -s | grep '^M.\+js$'
@alfredbez
alfredbez / typo3.selectStorage.sql
Created Feb 11, 2015
Liefert alle Datensätze, die Dateilinks aus dem Storage 1 (meistens "fileadmin") einbinden
View typo3.selectStorage.sql
SELECT DISTINCT
t4.title as Seite,
t4.uid as SeitenID,
t3.header as Titel,
t3.uid as InhaltsID
FROM
sys_file as t1,
sys_file_reference as t2,
tt_content as t3,
pages as t4
View print.css
@media print
{
*,
*:before,
*:after
{
background: transparent !important;
box-shadow: none !important;
color: #000000 !important; /* Black prints faster:
http://www.sanbeiji.com/archives/953 */
View MinifyHtml.php
protected function _commentCB($m)
{
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![') || false !== strpos($m[1], 'TYPO3SEARCH'))
? $m[0]
: '';
}
View detectCapslock.js
$('body').keypress(function(e) {
var s = String.fromCharCode( e.which );
if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) {
console.log('caps is on');
}
});
@alfredbez
alfredbez / SassMeister-input.scss
Created Dec 12, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$fullWidth: 1000px;
$leftColumn: 250px;
$rightColumn: $fullWidth - $leftColumn;
$fullWidthFluid: $fullWidth / $fullWidth * 100%;
@alfredbez
alfredbez / SassMeister-input.scss
Created Dec 12, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$fullWidth: 1000px;
$leftColumn: 250px;
$rightColumn: $fullWidth - $leftColumn;
body {
You can’t perform that action at this time.