Skip to content

Instantly share code, notes, and snippets.

@ryanswrt
ryanswrt / flake-module.nix
Created February 16, 2023 02:34
Flake-parts module for declaring rust/crane projects
{ self, config, lib, flake-parts-lib, ... }:
let
inherit (flake-parts-lib) mkPerSystemOption;
inherit (lib) mkOption types;
inherit (types) functionTo raw listOf;
in {
# define all of the options on our flake
options = {
perSystem = mkPerSystemOption
2layout-component---index-5c7c5c481e75264dca3b.js Failed to load resource: the server responded with a status of 404 ()
sw.js:276 Uncaught (in promise) TypeError: Request scheme 'chrome-extension' is unsupported
at sw.js:276
at <anonymous>
page-component---src-pages-index-js-9c8473a324dc925b5ce2.js Failed to load resource: the server responded with a status of 404 ()
2layout-component---index-5c7c5c481e75264dca3b.js Failed to load resource: the server responded with a status of 404 ()
sw.js:276 Uncaught (in promise) TypeError: Request scheme 'chrome-extension' is unsupported
at sw.js:276
at <anonymous>
(anonymous) @ sw.js:276
@ryanswrt
ryanswrt / PKGBUILD
Created May 18, 2017 11:48
OpenResty PKGBUILD with openssl1.0.2j
# Maintainer: Daichi Shinozaki <dseg@shield.jp>
# Contributor: Jean-Sébastien Ney <jeansebastien.ney@gmail.com>
# Contributor: James Cleveland <jc@blackflags.co.uk>
# Contributor: Eimantas Bunevičius <eimantaster@gmail.com>
_cfgdir=/opt/openresty/nginx/conf
_tmpdir=/var/lib/openresty
pkgname=openresty
pkgver=1.11.2.2
pkgrel=1
pkgdesc="A Fast and Scalable Web Platform by Extending NGINX with Lua"
template(name="Profile")
.sidebar-profile
+ProfileDetails
.main-profile
.feed-profile
+MainProfileContainer
.add-profile
+SideProfileContainer
.clear-fix
Schemas.Link = (collection) ->new SimpleSchema
url:
type: String
regEx: SimpleSchema.RegEx.Url
meta:
type: Object
optional:true
autoValue: ->
if this.isInsert
doc_id = this.field('_id')
@ryanswrt
ryanswrt / gist:67860b160aa06308dbd9
Created April 22, 2015 13:04
Denormalized Relation - infinite loop bug?
Utils.getDescendantProp = (obj, desc)->
arr = desc.split(".")
first = arr[0]
while arr.length and obj[first]
obj = obj[first]
first = arr.shift()
return obj
Schemas.buildDenormalizedRelation = (collection,fields,pk,fk)->
@ParentSchemaCol = new Meteor.Collection('parentcol')
@SubSchemaCol = new Meteor.Collection('subcol')
subSchema = new SimpleSchema {
autovalue: {
type: Date
autoValue: ->
new Date()
}
value:{
Template.Foo.created = function(){
console.log(this);
this.data.store = new ReactiveDict()
this.data.store.set('post',{});
this.data.store.set('images',[]);
this.data.store.set('files',[]);
};
Template.Foo.events({