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
WITH RECURSIVE | |
subdept AS ( | |
SELECT | |
d.department_id, | |
d.department_parent_id, | |
d.name department_name | |
FROM department d | |
JOIN employee e USING (department_id) | |
WHERE e.employee_id = 13 | |
UNION ALL |
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
PREPARE emp_info AS | |
WITH RECURSIVE | |
subdept(id, name, parent_id) AS ( | |
SELECT | |
emp.department_id, | |
dpt.name, | |
dpt.department_parent_id | |
FROM department dpt |
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
core.autocrlf=input | |
... | |
alias.ll=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
alias.co=checkout | |
alias.ci=commit | |
alias.br=branch | |
alias.st=status | |
alias.cop=!git checkout $1 && git pull origin $1 | |
alias.cob=checkout -b $1 | |
alias.fp=!git push origin develop master && git push --tags |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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
/* in windows (may need to create the chrome folder) : %APP_DATA% Roaming\Mozilla\Firefox\Profiles\xxxxxxx.default\chrome */ | |
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* Center the personal toolbar items */ | |
#PlacesToolbarItems { | |
-moz-box-pack: center | |
} | |
/* Padding Adjustements */ |
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
require 'uri' | |
require 'net/http' | |
require 'json' | |
class UpdatesIssuesNotifierListener < Redmine::Hook::Listener | |
CALLBACK_URL = 'https://localhost:3333'.freeze | |
def controller_issues_edit_after_save(context) | |
data = { | |
'issueid' => context[:issue].id, |
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\Model; | |
use PommProject\Foundation\Converter\ConverterHolder; | |
use PommProject\Foundation\Session\Session; | |
use PommProject\ModelManager\SessionBuilder as ModelManagerSessionBuilder; | |
/** | |
* Class SessionBuilder | |
* |
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
String.prototype.getInitials = function(glue){ | |
if (typeof glue == "undefined") { | |
var glue = true; | |
} | |
var initials = this.replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g); | |
if (glue) { | |
return initials.join(''); | |
} |
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
# General config | |
POWERLEVEL9K_MODE='nerdfont-fontconfig' | |
POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k | |
# prompt | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status dir_writable time) | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator user dir vcs) | |
# other options | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true |
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
with | |
test as ( | |
select * | |
from ( | |
values | |
(123, '{"key_1": {"value_1": 1}}'::jsonb), | |
(123, '{"key_2": {"value_2": 2}}'::jsonb), | |
(123, '{"key_3": {"value_3": 3}}'::jsonb), | |
(456, '{"key_4": {"value_4": 4}}'::jsonb), | |
(456, '{"key_1": {"value_3": 4}}'::jsonb) |