Skip to content

Instantly share code, notes, and snippets.

# Hello GistLog!
This is a test for http://gistlog.co.
How cool is this
@uxweb
uxweb / PSR2.sublime_build
Last active February 16, 2017 13:40
Sublime Text PHP CS Fixer PSR-2 Build Snippet
{
"shell_cmd": "php-cs-fixer fix $file --using-cache=no -v --rules=@PSR2"
}
@uxweb
uxweb / php-class.sublime-snippet
Last active July 5, 2018 11:37
Sublime Text PHP Snippets
<snippet>
<content><![CDATA[
class ${1:MyClass}
{
${2}
}$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>class</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@uxweb
uxweb / Preferences.sublime-settings
Created November 30, 2016 00:00
My Sublime Text User Settings
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 0,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"draw_white_space": "all",
"font_face": "Operator Mono",
@uxweb
uxweb / sublime-text-packages.md
Last active November 30, 2016 07:04
My Sublime Text Development Packages
@uxweb
uxweb / php-method.sublime-snippet
Created February 17, 2017 16:19
Sublime Text PHP Class Method Snippets
<snippet>
<content><![CDATA[
public function ${1}()
{
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>met</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@uxweb
uxweb / letsencrypt_2017.md
Created October 17, 2017 06:48 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
@uxweb
uxweb / launch.json
Created June 22, 2018 21:09
VSCode debug config for Vue.js App
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
@uxweb
uxweb / HasUuid.php
Created July 12, 2018 18:23 — forked from calebporzio/HasUuid.php
A little trait to add to models that will have Uuids
<?php
// Example usage in a model:
class ExampleModel extends Model
{
use HasUuid;
protected $primaryKey = 'uuid';