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
;Get all methods/properties of some object | |
(goog.object/getKeys some-object) | |
;Getting undefined errors? Use undefined? to probe | |
(undefined? load-namespace) | |
(undefined? str) |
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
(defn make-param-str [param-map] | |
(join "&" (map (fn [[key val]] (format "%s=%s" (name key) val)) param-map))) | |
;TODO still needs URL encoding -- format wont work in clojurescript |
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
#include <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
typedef struct Node { | |
int data; | |
struct Node *next; | |
struct Node *prev; | |
} Node; |
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
type NotGoodbye<T> = T extends "goodbye" ? never : T; | |
type Salutation = "hello" | "goodbye"; | |
type AllPossibleWords = string | |
type AllPossibleWordsWithoutGoodbye = NotGoodbye<AllPossibleWords> | |
function neverSayBye(salutation: NotGoodbye<Salutation>, greetee: string) { | |
console.log(`${salutation} ${greetee}`) | |
} | |
neverSayBye('goodbye', 'David'); |
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
// Name: pull requests | |
import "@johnlindquist/kit"; | |
const ghToken = await env('GH_TOKEN', 'Add your Github Personal Access Token'); | |
const repo = 'johnlindquist/kit'; | |
const [owner, name] = repo.split('/', 2); | |
const query = ` | |
query pullRequests($owner: String!, $name: String!) { |
OlderNewer