This file contains 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
{ | |
"editor.copyWithSyntaxHighlighting": false, | |
"diffEditor.ignoreTrimWhitespace": false, | |
"editor.emptySelectionClipboard": false, | |
"workbench.editor.enablePreview": false, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"files.trimTrailingWhitespace": true, | |
"diffEditor.renderSideBySide": false, | |
"editor.snippetSuggestions": "top", | |
"editor.detectIndentation": false, |
This file contains 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 running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains 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
// Comments | |
++ -- /= && || ||= | |
-> => :: __ | |
== === != =/= | |
<= >= <==> | |
/* */ // /// | |
\n \\ | |
<< <<< <<= >> >>> >>= |= ^= | |
0xFF 1920x1080 |
This file contains 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\Notifications; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Notifications\Notification; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Notifications\Messages\MailMessage; | |
//This example use the official's sendgrid php helper (https://github.com/sendgrid/sendgrid-php) |
This file contains 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
version: '3' | |
services: | |
proxy: | |
container_name: proxy | |
image: jwilder/nginx-proxy | |
ports: | |
- 80:80 | |
volumes: |
This file contains 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
$(function() { | |
$('#sortable').sortable({ | |
start: function(event, ui) { | |
var start_pos = ui.item.index(); | |
ui.item.data('start_pos', start_pos); | |
}, | |
change: function(event, ui) { | |
var start_pos = ui.item.data('start_pos'); | |
var index = ui.placeholder.index(); | |
if (start_pos < index) { |
This file contains 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
CREATE DEFINER=`admin`@`10.0.0.1` PROCEDURE `removeProcessed`(table_name VARCHAR(255), keyField VARCHAR(255), maxId INT, num_rows INT) | |
BEGIN | |
SET @table_name = table_name; | |
SET @keyField = keyField; | |
SET @maxId = maxId; | |
SET @num_rows = num_rows; | |
SET @sql_text1 = concat('SELECT MIN(',@keyField,') INTO @a FROM ',@table_name); | |
PREPARE stmt1 FROM @sql_text1; | |
EXECUTE stmt1; |
This file contains 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
// For: @musaid | |
// https://twitter.com/musaid/status/1039688749205020672 | |
// Ligatures built into Operator Mono as "Operator Mono Lig" with https://github.com/kiliman/operator-mono-lig | |
// VS Code Extensions: | |
// Material Icon Theme (Philip Kief), | |
// indent-rainbow (oderwat), | |
// Rainbow Brackets (2gua), | |
// Subtle Match Brackets (Rafa Mel), | |
// Git Lense | |
// Prettier (Esben Petersen) (require config file with requireConfig) |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
public function ${1:relationship}() | |
{ | |
return \$this->belongsToMany(${2:${1/^(.+)$/(?1\u$1:)/g}}::class${3:, '${4:table}'}); | |
} | |
]]></content> | |
<tabTrigger>belm</tabTrigger> | |
<scope>source.php</scope> | |
</snippet> |
This file contains 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
FROM ubuntu:16.04 | |
# Set the env variable DEBIAN_FRONTEND to noninteractive | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG LC_ALL=C.UTF-8 | |
# Set the locale | |
RUN apt-get clean && apt-get update && apt-get install -y locales | |
# Set the locale |
NewerOlder