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 scroll_to(splash, x, y) | |
| local js = string.format( | |
| "window.scrollTo(%s, %s);", | |
| tonumber(x), | |
| tonumber(y) | |
| ) | |
| return splash:runjs(js) | |
| 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
| curl -i https://api.github.com/repos/scrooloose/nerdtree/forks |grep -e "git_url" |awk '{gsub(/,/,"");split($2,a,"/"); system("mkdir "a[4]"; cd "a[4]"; git clone " $2);}' |
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
| https://www.amazon.com/Gildan-Platinum-Mens-5-Pack-T-Shirt/dp/B07575MXH4/ref=pd_sbs_193_1?_encoding=UTF8&pd_rd_i=B07575MXH4&pd_rd_r=NVSNRHYS4CG3X8YJR82Z&pd_rd_w=Oj6AO&pd_rd_wg=iVGLo&refRID=NVSNRHYS4CG3X8YJR82Z | |
| https://www.amazon.com/Gildan-Platinum-Mens-5-Pack-T-Shirt/dp/B07575MXH4/ref=pd_sbs_193_1?_encoding=UTF8&pd_rd_i=B07575MXH4&pd_rd_r=NVSNRHYS4CG3X8YJR82Z&pd_rd_w=Oj6AO&pd_rd_wg=iVGLo&refRID=NVSNRHYS4CG3X8YJR82Z | |
| https://www.amazon.com/Gildan-Mens-T-Shirts-White-Large/dp/B077ZMKWVM/ref=sr_1_2?s=apparel&ie=UTF8&qid=1526879873&sr=1-2&nodeID=1040658&psd=1&keywords=crew+neck+shirt+men | |
| https://www.amazon.com/Gildan-Platinum-5-Pack-T-Shirt-Black/dp/B07575B6C7/ref=sr_1_8?s=apparel&ie=UTF8&qid=1526880186&sr=1-8&nodeID=7147441011&psd=1&keywords=crew+neck+t+shirt+men | |
| https://www.amazon.com/Next-Level-NL6410-Premium-T-Shirt/dp/B0149PS4IQ/ref=sr_1_21?s=apparel&ie=UTF8&qid=1526880219&sr=1-21&nodeID=7147441011&psd=1&keywords=crew+neck+t+shirt+men | |
| https://www.amazon.com/Next-Level-NL6410-Premium-T-Shirt/dp/B0149PU3NK/re |
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
| ** Find commmonly accessed tables and their use of indexes: | |
| SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
| Returns output like: | |
| relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
| ----------------------+--------------+---------------+------------------------ | |
| schema_migrations | 817 | 0 | 0.00000000000000000000 | |
| user_device_photos | 349 | 0 | 0.00000000000000000000 |
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
| #!/usr/bin/env bash | |
| rep() { | |
| i=$1 | |
| data=$2 | |
| ## run the replicate .... | |
| } | |
| # make the files | |
| START=$(mktemp -t start-XXXX) ## signals the workers are starting |
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
| CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json) | |
| RETURNS json | |
| IMMUTABLE | |
| LANGUAGE sql | |
| AS $$ | |
| SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json | |
| FROM ( | |
| SELECT * FROM json_each(data) | |
| UNION ALL | |
| SELECT * FROM json_each(insert_data) |
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
| --- /opt/Intra/lib/CPAN/lib/perl5/x86_64-linux-thread-multi/Devel/NYTProf/Reader.pm 2011-10-24 18:49:39.000000000 +0000 | |
| +++ pnytprof_lib/Devel/NYTProf/Reader.pm 2011-10-24 19:16:36.000000000 +0000 | |
| @@ -18,7 +18,7 @@ | |
| use Carp; | |
| use Config; | |
| -use List::Util qw(sum max); | |
| +use List::Util qw(sum max first); | |
| use Data::Dumper; | |
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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Storable qw/dclone/; | |
| use Data::Dumper; | |
| my $a = { | |
| '%h_outside' => { | |
| 'a' => 1, | |
| 'b' => 2 |
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 <iostream> | |
| using namespace std; | |
| int main() { | |
| int n = 23; | |
| //int* v = new int[n]; | |
| int v[] = {8,3,1,5,39,20,21,100,123,22,55,62,72,54,1,3,2,6,3,5,29,10}; | |
| /* | |
| *cout<<"vectorul "; |
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 <iostream> | |
| #include <string> | |
| #include <stdlib.h> | |
| using namespace std; | |
| /* | |
| * Minimalistic testing "framework" | |
| * | |
| */ |