This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
class CloseOtherTabsCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
active_group = self.window.active_group() | |
curr_view_id = self.window.active_view_in_group(active_group).id() | |
for v in self.window.views_in_group(active_group): | |
if v.id() == curr_view_id: continue | |
self.window.focus_view(v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Log; | |
use Illuminate\Http\Request; | |
use Symfony\Component\Process\Process; | |
use Laravel\Lumen\Routing\Controller as BaseController; | |
class WebhookController extends BaseController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = PhpCsFixer\Finder::create() | |
->exclude('somedir') | |
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') | |
->in(__DIR__) | |
; | |
return PhpCsFixer\Config::create() | |
->setUsingCache(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@servers(['web' => 'me']) | |
@setup | |
$date = date('YmdHis'); | |
$repo = '[email protected]:username/repo.git'; | |
$app_dir = 'your/host/path'; | |
$releases = '/var/www/releases'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo openssl genrsa -out "/etc/ssl/your-domain-name.key" 2048 | |
# Generate a CSR using the private key for encryption | |
sudo openssl req -new -key "/etc/ssl/your-domain-name.key" -out "/etc/ssl/your-domain-name.csr" | |
sudo openssl x509 -req -days 365 \ | |
-in "/etc/ssl/your-domain-name.csr" \ | |
-signkey "/etc/ssl/your-domain-name.key" \ | |
-out "/etc/ssl/your-domain-name.crt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\User; | |
use Faker\Factory; | |
use Illuminate\Support\Str; | |
use Illuminate\Database\Seeder; | |
use Illuminate\Support\LazyCollection; | |
class DatabaseSeeder extends Seeder | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
const files = require.context('./', true, /\.vue$/i) | |
files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) | |
new Vue({ | |
el: "#app", | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"scope": "source.*", | |
"completions": [ | |
{ "trigger": "container", "contents": "container" }, | |
{ "trigger": "sr-only", "contents": "sr-only" }, | |
{ "trigger": "not-sr-only", "contents": "not-sr-only" }, | |
{ "trigger": "focus:sr-only", "contents": "focus:sr-only" }, | |
{ "trigger": "focus:not-sr-only", "contents": "focus:not-sr-only" }, | |
{ "trigger": "appearance-none", "contents": "appearance-none" }, | |
{ "trigger": "bg-fixed", "contents": "bg-fixed" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true |