Skip to content

Instantly share code, notes, and snippets.

@rleger
rleger / PHP Delete File
Created April 20, 2014 10:12
PHP Delete File
<?php
/**
* Deleting file
* @param string $fullpath Filename with its full path
* @return array key => result
*/
function deleteFile( $fullpath ) {
if (file_exists($fullpath)) {
$hasBeenDeleted = unlink($fullpath);
@rleger
rleger / Sublime text base16 Markup Theme
Created May 3, 2014 13:49
Sublime text base16 Markup Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>base16 Markup</string>
@rleger
rleger / assign-vars-from-controller.sublime-macro
Created January 4, 2015 19:20
Initialize fields from php controller macro - Sublime text 3
[
{
"command": "escape"
},
{
"command": "expand_selection",
"args": {"to": "word"}
},
{
"args": null,
@rleger
rleger / add-curly-braces.sublime-macro
Created January 4, 2015 19:34
Add curly braces Sublime text 3
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / EOL-coma.sublime-macro
Created January 4, 2015 19:35
Add coma to end of line - Sublime text 3
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / EOL-semicolumn.sublime-macro
Created January 4, 2015 19:35
Add semicolumn to end of line - Sublime text 3
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / .php_cs
Last active August 29, 2015 14:20
PHP CS fixer config file
<?php
$header = <<<EOF
This file is part of the PHP CS utility.
(c) Fabien Potencier <fabien@symfony.com>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
@rleger
rleger / index.html
Created July 16, 2015 06:48
Tags with VueJs and FlatUI Pro from Designmodo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue Tags</title>
<link rel="stylesheet" type="text/css" href="css/vendor/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/flat-ui-pro.min.css">
<script src="vue-js.min.js"></script>
</head>
<body>
@rleger
rleger / HTML 5 Start File
Last active December 19, 2015 12:09 — forked from peteymoore/gist:5392815
HTML 5 Start file
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Template</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
@rleger
rleger / .php_cs
Created January 4, 2016 00:20 — forked from jatubio/.php_cs
Config file to pass PHP-CS-Fixer with Laravel 5.1 custom and PSR-2 styles coding
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);