Skip to content

Instantly share code, notes, and snippets.

View 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
Sublime text base16 Markup Theme
View 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 Jan 4, 2015
Initialize fields from php controller macro - Sublime text 3
View assign-vars-from-controller.sublime-macro
[
{
"command": "escape"
},
{
"command": "expand_selection",
"args": {"to": "word"}
},
{
"args": null,
@rleger
rleger / add-curly-braces.sublime-macro
Created Jan 4, 2015
Add curly braces Sublime text 3
View add-curly-braces.sublime-macro
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / EOL-coma.sublime-macro
Created Jan 4, 2015
Add coma to end of line - Sublime text 3
View EOL-coma.sublime-macro
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / EOL-semicolumn.sublime-macro
Created Jan 4, 2015
Add semicolumn to end of line - Sublime text 3
View EOL-semicolumn.sublime-macro
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@rleger
rleger / .php_cs
Last active Aug 29, 2015
PHP CS fixer config file
View .php_cs
<?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 Jul 16, 2015
Tags with VueJs and FlatUI Pro from Designmodo
View index.html
<!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 Dec 19, 2015 — forked from peteymoore/gist:5392815
HTML 5 Start file
View 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 Jan 4, 2016 — forked from jatubio/.php_cs
Config file to pass PHP-CS-Fixer with Laravel 5.1 custom and PSR-2 styles coding
View .php_cs
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);