Skip to content

Instantly share code, notes, and snippets.

View nc's full-sized avatar

Namit Chadha nc

View GitHub Profile
@nc
nc / issue_14.test.ts
Created November 26, 2021 17:49
Failing test case for #14
import * as Y from 'yjs';
import { proxy } from 'valtio/vanilla';
import { bindProxyAndYMap } from '../src/index';
describe('issue #14', () => {
it('nested map direct set', async () => {
const doc = new Y.Doc();
const p = proxy({ items: { item1: { color: 'blue' } } });
const m = doc.getMap('map');
@nc
nc / Takana JS
Created February 22, 2014 14:45
<script type="text/javascript">
var tag = document.createElement("script");
tag.setAttribute("type", "text/javascript");
tag.setAttribute("src", "http://" + window.location.hostname + ":48626/takana.js");
tag.setAttribute("data-project", "eindx-prototype-discover");
document.body.appendChild(tag);
</script>
path = require 'path'
module.exports = (grunt) ->
grunt.initConfig
clean:
css: 'public/styles/application.css'
sass:
dist:
files:
---
BUNDLE_WITHOUT: test:development
BUNDLE_CACHE_ALL: true
@nc
nc / gist:6031767
Created July 18, 2013 18:35
Fixed gradient-stops function
// Generates a striped background
@function gradient-stops($grid-columns, $color: $visual-grid-color) {
$transparent: rgba(0,0,0,0);
$column-width: flex-grid(1, $grid-columns);
$gutter-width: flex-gutter($grid-columns);
$column-offset: $column-width;
$values: ($transparent 0, $color 0);
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="page.css">
</head>
<body>
<article>
<header>
@nc
nc / dabblet.css
Created May 4, 2012 04:50
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.fb-login {
font-family: "Helvetica Neue";
background: -webkit-linear-gradient(#6F8ECB,#5973AB);
padding: 1rem 2rem;
box-shadow: inset 0px 1px 3px rgba(255,255,255,0.25), inset 0px -1px 1px rgba(255,255,255,0.25);
color: white;
@nc
nc / dabblet.css
Created May 1, 2012 18:05 — forked from anonymous/dabblet.css
Slider
/**
* Slider
*/
* {
margin: 0;
padding: 0;
}
html {
module Foursquare
def self.table_name_prefix
'foursquare_'
end
def self.config_yml
yml = YAML.load File.open(Rails.root.join('config', 'foursquare.yml')).read
yml[Rails.env]
end