Skip to content

Instantly share code, notes, and snippets.

View reggi's full-sized avatar
🌺
Learning

Reggi reggi

🌺
Learning
View GitHub Profile
  • 1 - Grand Illusion (Renoir,Jean) 1937
  • 2 - Seven Samurai (Kurosawa,Akira) 1954
  • 3 - The Lady Vanishes (Hitchcock,Alfred) 1938
  • 4 - Amarcord (Fellini,Federico) 1974
  • 5 - The 400 Blows (Truffaut,François) 1959
  • 6 - Beauty and the Beast (Cocteau,Jean) 1946
  • 7 - A Night to Remember (Baker,Roy Ward) 1958
  • 8 - The Killer (Woo,John) 1989
  • 9 - Hard Boiled (Woo,John) 1992
  • 10 - Walkabout (Roeg,Nicolas) 1971
@reggi
reggi / code.gs
Created December 16, 2020 17:44
Google Sheets Border Script
function colorAll() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 1;
var endRow = sheet.getLastRow();
for (var r = startRow; r <= endRow; r++) {
colorRow(r);
}
}
<!DOCTYPE html>
<html lang="en" id="{block:IndexPage}index{/block:IndexPage}{block:PermalinkPage}permalink{/block:PermalinkPage}" class="no-js {block:ifNotInfiniteScroll}no-{/block:ifNotInfiniteScroll}infscr {block:ifNotEnableAnimations}no-{/block:ifNotEnableAnimations}animations transitions {block:ifNotFadeInPosts}no-{/block:ifNotFadeInPosts}fadein {block:ifNotLoadPostsIndividually}no-{/block:ifNotLoadPostsIndividually}loadsolo not-mobile {block:ifTransparentPostBackground}transbg{/block:ifTransparentPostBackground} {block:ifBorderAroundIndexPosts}border-post{/block:ifBorderAroundIndexPosts} {block:ifBorderAroundPermalinkContent}border-content{/block:ifBorderAroundPermalinkContent} {block:ifBorderAroundPermalinkMeta}border-meta{/block:ifBorderAroundPermalinkMeta} {block:ifPhotosStretchToFillWidth}photostretch{/block:ifPhotosStretchToFillWidth} {block:ifPhotosClickThroughToPermalink}photoclickthrough{/block:ifPhotosClickThroughToPermalink} {block:ifNotShowLikeAndReblogButtons}no-{/block:ifNotShowLikeAndReblog
@reggi
reggi / ddl-lookup.md
Last active September 24, 2020 17:32

DDL Lookup table:

commands nodeDriverHandle hasWriteConcern isExplicitlyWrite hasWriteAspect4.0 operationFile4.0 hasWriteAspect3.6 operationFile3.6
class MongoOptions () {
static parse () {
// does all the parsing without async eg DNS checking operations
}
static performAsync () {
// follow up handler to check eg DNS (async) tasks
}
static parseAsync () {

Class Design Discussion

This is a document containg many different examples of how to create the same base code. Each example is different, contains a different API, or different added functionality such as cashing.

echo "\nchanging the directory to home dir --------------------------------------------------------------------------------------------------------\n"
cd ~/
echo "\nkilling all running mongo processes -------------------------------------------------------------------------------------------------------\n"
mongod --shutdown --config /shared/replica-sets/mongod-repl-1.conf
mongod --shutdown --config /shared/replica-sets/mongod-repl-2.conf
mongod --shutdown --config /shared/replica-sets/mongod-repl-3.conf
echo "\nremoving all data directories -------------------------------------------------------------------------------------------------------------\n"
rm -rf /var/mongodb/db/1
@reggi
reggi / question-nestjs-graphql-nested-resolvers.md
Last active July 10, 2023 14:11
How do I have nested resolvers in nestjs / type-graphql?

I am trying to find a way that a resolver can essentially return another resolver using [nest.js][1] for creating [Resolvers][2], and [type-graphql][3] to create [object types][4].

Here's an example with the star-wars graphql api

{
  allVehicles(first: 1, last: 100) {
    vehicles {
      name
export function ServiceState<G>(): new () => { value?: G, set(type: G): G }
export function ServiceState<G>(type: G): new () => { value: G, set(type: G): G }
export function ServiceState<G>(type?: G) {
return class ServiceState {
value: G | undefined
constructor() {
this.value = type
}