Skip to content

Instantly share code, notes, and snippets.

Venkat Dinavahi venkatd

Block or report user

Report or block venkatd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View play.dart
import 'dart:io';
Future<void> startPlayServer(int port) async {
HttpServer server = await HttpServer.bind(
InternetAddress.loopbackIPv4,
port,
);
await for (var request in server) {
_handleRequest(request);
}
View crawl.go
type linkCollector func(page crawler.Page) []string
func crawl(client crawler.Client, startPageURL string, collect linkCollector, maxConcurrency int) {
concurrencyLimiter := make(chan struct{}, maxConcurrency)
var wg sync.WaitGroup
for i := 0; i < maxConcurrency; i++ {
concurrencyLimiter <- struct{}{}
}
wg.Add(1)
View components.button-ui.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click(e) {
alert('yo')
if(this.get('action')){
this.get('action')(this.get('params'));
}
}
View components.task-tree.js
import Ember from 'ember';
export default Ember.Component.extend({
isExpanded: false,
isExpandedAtFirst: false,
init() {
this._super(...arguments)
this.set('isExpanded', this.get('isExpandedAtFirst'))
},
View gisty.txt
0x1E65F71b024937b988fdba09814d60049e0Fc59d
View pghero-setup.md

Setting up pghero

Install docker for Mac

https://www.docker.com/docker-mac

Install pghero

Run the following commands

localip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\  -f2)
dburl=postgres://venkat@docker.local:5432/turtle_dev
View query.ex
defmodule Neo.Query do
defstruct [
piped_queries: [],
optional_queries: [],
labels: [],
match_clauses: [],
merge_clauses: [],
where_clauses: [],
create_clauses: [],
View query_spec.exs
defmodule Neo.QueryTest do
use ExUnit.Case
import Neo.Query
test "generates a simple match + return query" do
query = new_query
|> labels(yo: "yeah/man", dude: "nah")
|> return([:yo])
View editor.js
import React from 'react'
import {Editor as MobileDocEditor} from 'mobiledoc-kit';
const MOBILEDOC_VERSION = '0.3.0';
const EMPTY_MOBILEDOC = {
version: MOBILEDOC_VERSION,
markups: [],
atoms: [],
cards: [],
View manager.md
- turtle project
-- venkat's this week
---- task a
---- task b
-- vlad's this week
---- task q
---- task r
You can’t perform that action at this time.