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
| const http = require('https') | |
| const querystring = require('querystring') | |
| const adr = 'https://www.random.org/integers/?'; | |
| const qry = querystring.stringify({ | |
| num: 100, | |
| min: 1, | |
| max: 100, | |
| col: 1, |
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
| IFS=$'\n' | |
| dest=FL_insurance_sample.csv | |
| counties=$(cut -d',' -f 3 $dest | sort | uniq) | |
| for county in $counties | |
| do | |
| cnt=$(grep $county $dest | wc -l) | |
| echo $county has $cnt | |
| done |
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
| // this GIST is available under the conditions of | |
| // https://creativecommons.org/licenses/by/4.0/ | |
| const psList = require('ps-list'); | |
| const { interval, from } = require('rxjs'); | |
| const { switchMap, filter, map } = require('rxjs/operators'); | |
| interval(500) | |
| .pipe( switchMap(() => psList()), |
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
| --- # this GIST is available under the conditions of | |
| --- # https://creativecommons.org/licenses/by/4.0/ | |
| SELECT | |
| MAX(LAST_SAMPLe_DATE) AS "Last use", | |
| NAME AS "Name", | |
| CAST (TO_CHAR(SUM(DETECTED_USAGES) / SUM(TOTAL_SAMPLES) * 100, '999') AS VARCHAR2(5)) AS "%" | |
| FROM | |
| dba_feature_usage_statistics | |
| WHERE |
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
| --- this GIST is available under the conditions of | |
| --- https://creativecommons.org/licenses/by/4.0/ | |
| CREATE EXTENSION oracle_fdw; | |
| drop server orcl19; | |
| CREATE SERVER orcl19 FOREIGN DATA WRAPPER oracle_fdw | |
| OPTIONS (dbserver '//localhost:1521/ORCL19'); | |
| GRANT USAGE ON FOREIGN SERVER orcl19 TO postgres; |
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
| # this GIST is available under the conditions of | |
| # https://creativecommons.org/licenses/by/4.0/ | |
| # example how to search Outlook mailbox via COM automation | |
| # + find lines with specific text while also further filtering these | |
| # this approach is actually much more readable than the VB examples in MS help | |
| # thanks to escaped quotes not subject to some ugly concatenation practices | |
| # | |
| # useful references here: | |
| # https://docs.microsoft.com/en-us/office/vba/outlook/how-to/search-and-filter/filter-the-body-of-a-mail-item |
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
| # this GIST is available under the conditions of | |
| # https://creativecommons.org/licenses/by/4.0/ | |
| using namespace Oracle.ManagedDataAccess.Core | |
| # the following is needed if the connector is already globally installed | |
| # but IS OKAY even without dependencies, as these install half gig of the .NET core libs anyway | |
| # | |
| # $dest = "$(gl)\packages\" | |
| # Install-Package -Name Oracle.ManagedDataAccess.Core -Destination $dest -SkipDependencies |
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
| // -- this GIST is available under the conditions of | |
| // -- https://creativecommons.org/licenses/by/4.0/ | |
| // | |
| // this are four approaches to solution to one trivial task from | |
| // Bulgaria's softuni's curriculum that i was asked to help with | |
| // | |
| // | |
| // the input is basically 4 integers K, L, M, N | |
| // | |
| // then we have a integer ranges for the digits A, B, C, D |
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 Install-CollectDependencies { | |
| Set-PackageSource -SourceName nuget.org -NewLocation https://www.nuget.org/api/v2 | |
| Install-Package System.Numerics.Vectors,System.ValueTuple -SkipDependencies -Destination packages | |
| Install-Package System.Runtime.CompilerServices.Unsafe -SkipDependencies -Destination packages | |
| Install-Package System.Memory,System.ValueTuple -SkipDependencies -Destination packages | |
| Install-Package System.Threading,System.Threading.Tasks -SkipDependencies -Destination packages | |
| Install-Package Runtime.Native.System,System.Runtime.Handles,System.Runtime.InteropServices -SkipDependencies -Destination packages | |
| Install-Package System.Reflection.Extensions -SkipDependencies -Destination packages | |
| Install-Package System.Console,System.AppContext,System.Collections -SkipDependencies -Destination packages | |
| Install-Package Microsoft.Win32.Primitives,System.Globalization.Calendars -SkipDependencies -Destination packages |