View gist:bd50b322e3507bc377134eb6ee1a6974
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
curl --header "Authorization: Bearer <your_access_token>" https://gitlab.example.com/api/v4/projects | | |
jq -c -r '.[]|[.http_url_to_repo, .visibility]' | |
# works with private token or OAuth token |
View gist:6fd1c167e772276701e19457d235ddf5
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
curl -H "Authorization: token $token" -s "https://api.github.com/orgs/$orgname/repos?per_page=100&page=$pagenum" | \ | |
jq -c -r '.[]|[.html_url, .private]' |
View scrub_strings.pl
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
perl -p -e "local \$/ = undef; my \$log = <>; \$log =~ s/('|\\\$[a-zA-Z0-9_]*\\\$)(.*)\$1/\$1 . (q[X] x length(\$2)) . \$1/gme; print \$log;" /tmp/logsamp |
View appveyor-cranges.yml
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
# appveyor.yml | |
before_build: | |
- set PATH=C:\Program Files\PostgreSQL\9.6\bin;%PATH% | |
- cmake -G "Visual Studio 14 2015 Win64" | |
- dir | |
- pg_config | |
build: | |
project: cranges.sln |
View appveyor.yml
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
# appveyor.yml | |
install: | |
- cinst winflexbison | |
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64' | |
before_build: | |
- net user testuser Blurfl9426! /add | |
- rename c:\ProgramData\chocolatey\bin\win_flex.exe flex.exe | |
- rename c:\ProgramData\chocolatey\bin\win_bison.exe bison.exe | |
- curl -S -O https://gist.githubusercontent.com/adunstan/7f18e5db33bb2d73f69ff8c9337a4e6c/raw/buildsetup.pl |
View dll2lib.bat
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
@echo off | |
rem see http://stackoverflow.com/questions/9946322/how-to-generate-an-import-library-lib-file-from-a-dll#9946390 | |
rem see also http://www.postgresql-archive.org/MSVC-pl-perl-error-message-is-not-verbose-enough-td5913411.html | |
rem see also https://postgr.es/m/CABcP5fjEjgOsh097cWnQrsK9yCswo4DZxp-V47DKCH-MxY9Gig@mail.gmail.com | |
REM Usage: dll2lib [32|64] some-file.dll | |
REM | |
REM Generates some-file.lib from some-file.dll, making an intermediate |
View 20mirror-outside-files
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
#!/bin/sh | |
set -e | |
# Based on nealmcb's + ErebusBat's script from http://serverfault.com/questions/211425/ | |
# put this file in etckeeeper's commit.d directory | |
# in the config file set MIRROR_ROOT (somewhere under /etc) MIRROR_FILES and MIRROR_DIRS | |
# the latter two can contain wildcards | |
# all three symbols must be exported or they won't be seen by this script |
View gist:3ae53e8b27a8205d2379
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
with recursive | |
dag (depended_on,dependent) as | |
( | |
values | |
('b2'::text,'d1'::text), | |
('d1','d2'), | |
('d2','d3'), | |
('d3','d4'), | |
('b1','a1'), | |
('b2','a1'), |
View sql_json_comparison_ops.sql
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 OR REPLACE FUNCTION json_cmp(left json, right json) | |
RETURNS integer AS $$ | |
select bttextcmp($1::text, $2::text) | |
$$ LANGUAGE sql IMMUTABLE STRICT; | |
CREATE OR REPLACE FUNCTION json_eq(json, json) | |
RETURNS BOOLEAN LANGUAGE SQL STRICT IMMUTABLE AS $$ | |
SELECT json_cmp($1, $2) = 0; | |
$$; | |
View vacuum_schema.sql
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
-- requires dblink extension the be installed | |
-- vacuum a schema via dblink | |
create or replace function vacuum_schema(schemaname text) | |
returns void | |
language plpgsql | |
as | |
$func$ | |
declare |
NewerOlder