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
.git | |
.gitignore | |
Dockerfile | |
log | |
tmp | |
public/system |
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
#include "GridRenderer.h" | |
#include <Magnum/SceneGraph/Camera.h> | |
#include <Magnum/DebugTools/ResourceManager.h> | |
using namespace Magnum; | |
Color3 getLineColor(Float i, const Color3 &baseColor, const Color3 &axesColor, const Color3 &subColor) { | |
if (i == 0) { | |
return axesColor; |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"sync/atomic" | |
"time" |
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
function calculateInterceptShotPosition(pShooter, pTarget0, vTarget, sProjectile) | |
local R = pTarget0 - pShooter | |
local a = vTarget.x^2 + vTarget.y^2 - sProjectile^2 | |
local b = 2 * (R.x * vTarget.x + R.y * vTarget.y) | |
local c = R.x^2 + R.y^2 | |
if R:len2() < 1 then | |
return nil | |
end |
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
#!/bin/bash | |
read -r -d '' CHECK_QUERY <<-EOM | |
create extension if not exists plpgsql_check; | |
SELECT | |
(pcf).functionid::regprocedure, (pcf).lineno, (pcf).statement, | |
(pcf).sqlstate, (pcf).message, (pcf).detail, (pcf).hint, (pcf).level, | |
(pcf)."position", (pcf).query, (pcf).context |
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 r as ( | |
select id, parent_id | |
from products | |
where id = 100 | |
union | |
select p.id, p.parent_id | |
from products p | |
join r on p.id = r.parent_id | |
) | |
select id from r where parent_id is null; |
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
-- Deploy [% project %]:[% change %] to [% engine %] | |
[% FOREACH item IN requires -%] | |
-- requires: [% item %] | |
[% END -%] | |
[% FOREACH item IN conflicts -%] | |
-- conflicts: [% item %] | |
[% END -%] | |
BEGIN; |
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
BEGIN; | |
create function app.change_notify() | |
returns trigger | |
language plpgsql | |
as $$ | |
declare | |
channel_name text := coalesce(TG_ARGV[0], 'app_' || TG_TABLE_NAME || '_' || lower(TG_OP)); | |
begin | |
if TG_OP = 'INSERT' or TG_OP = 'UPDATE' then |
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 { compose, withProps } from 'recompact'; | |
import { Form } from 'antd'; | |
import moment from 'moment'; | |
import transform from 'utils/transform'; | |
import withInitialFormValues from './withInitialFormValues'; | |
export default compose( | |
Form.create(), | |
withProps(transform('data.node.birthday', moment)), | |
withInitialFormValues, |