Skip to content

Instantly share code, notes, and snippets.

View burn2delete's full-sized avatar
:octocat:
Building an open-source world....

Matt Ratzke burn2delete

:octocat:
Building an open-source world....
View GitHub Profile
@burn2delete
burn2delete / isEmpty.ts
Last active December 23, 2023 17:07
Utilities written in Typescript
/**
* Checks if the given value is null or undefined.
*
* @param {any} value - The value to check.
* @returns {boolean} - Returns true if the value is null or undefined, false otherwise.
*/
const isNullOrUndefined = (value: any): boolean => value === null || value === undefined;
/**
* Checks if the given value is an array.
@marshallswain
marshallswain / readme.md
Created April 17, 2017 12:40
FeathersJS: Better permissions

Better Permissions Control

We have introduced 3 new hooks and 2 new middleware as part of feathers-permissions that give you much more flexibility and control over access permissions than was previously possible. Permissions are stored in the database on the entity record that needs to have access permissions checked (typically a user). They look like this:

[
    '*', // all services, all methods, all docs
    'users:*', // all methods on users service
    'users:remove:*', // can remove any user
    '*:remove', // can remove on any service
function new-PowershellWebGUI ($HTMLRaw,$Title,$Runspace) {
[xml]$xaml = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="$Title" Height="500" Width="700">
<Grid>
<DockPanel>
<WebBrowser Name="WebBrowser" DockPanel.Dock="Top" Margin="30">
</WebBrowser>
(ns ui.form
(:refer-hoplon :exclude [select input textarea label form])
(:require [ui.form.input :as input]
[ui.button :as button]
[ui.modal :as modal]
[ui.grid :as grid]
[ui.filters :as filters]
[ui.link :as link]
[ui.util :as util]
[ui.icon :as icon]
(ns app.ui.login
(:require [goog.net.cookies :as cks]
[app.rpc :as rpc]
[ui.form :as form]
[ui.button :as button]
[workflow.form :as workflow]
[ui.modal :as modal]
[ui.app :as app]))
(def schema
(ns workflow.form
(:require
[castra.core :as castra]
[clojure.walk :as walk]
[clojure.data :as data]))
;; Form data manager ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- reset-vals!
[map-of-cells default]
@shaunlebron
shaunlebron / 00-input.cljs
Last active June 18, 2016 16:37
protocol implementation in cljs
;; dummy protocol
(defprotocol IFoo
(foo [this]))
;; dummy cljs type
(deftype Bar [])
;; extending a cljs type
(extend-type Bar
IFoo (foo [this] (println "Hello from IFoo.foo for Bar")))
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 22, 2024 02:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@alandipert
alandipert / kahn.clj
Last active June 24, 2023 17:59
Kahn's topological sort in Clojure
;; Copyright (c) Alan Dipert. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns alandipert.kahn
(:require [clojure.set :refer [difference union intersection]]))