Skip to content

Instantly share code, notes, and snippets.

View chandu0101's full-sized avatar

Chandra Sekhar Kode chandu0101

  • Vijayawada,India
View GitHub Profile
@danott
danott / entities.css
Created January 31, 2011 22:07
Use CSS's :after pseudo-selector to insert hexadecimal values of html entities into the document. Less markup. More awesome.
/* Daniel Ott
* entities.css
* 31 January 2011
*
* Adding arrows to thinks makes them more clickable. Right?
* Use CSS's :after pseudo-selector to insert hexadecimal values
* of html entities into the document. Less markup. More awesome.
*/
.add-an-arrow:after {
@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master
@sidharthkuruvila
sidharthkuruvila / gist:3154845
Created July 21, 2012 06:30
Utility to functions to convert between camel case and underscore separated names
/**
* Takes a camel cased identifier name and returns an underscore separated
* name
*
* Example:
* camelToUnderscores("thisIsA1Test") == "this_is_a_1_test"
*/
def camelToUnderscores(name: String) = "[A-Z\\d]".r.replaceAllIn(name, {m =>
"_" + m.group(0).toLowerCase()
})
@geksilla
geksilla / bootsrap_class_list
Last active October 18, 2024 08:37
Bootstrap css class list
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
@chrisgibson
chrisgibson / TokenAuthenticator.scala
Created January 30, 2014 20:08
Spray Token Authentication
import scala.concurrent.{ExecutionContext, Future}
import spray.routing.{AuthenticationFailedRejection, RequestContext}
import spray.routing.authentication.{Authentication, ContextAuthenticator}
/** Token based authentication for Spray Routing.
*
* Extracts an API key from the header or querystring and authenticates requests.
*
* TokenAuthenticator[T] takes arguments for the named header/query string containing the API key and
* an authenticator that returns an Option[T]. If None is returned from the authenticator, the request
@Sigmus
Sigmus / example.js
Created July 12, 2014 16:10
A React Google Maps Component
var GmapComponent = require('./google-maps-component');
var component = GmapComponent({
lat: -23.5348644, lng: -46.6718231
});
var node = document.getElementById('main');
React.renderComponent(component, node);
@japgolly
japgolly / DND.scala
Created August 11, 2014 07:56
Drag-and-Drop using scalajs-react
import org.scalajs.dom
import org.scalajs.dom.console
import scala.scalajs.js
import scalaz.{Equal, State, StateT}
import scalaz.std.option.optionEqual
import scalaz.std.tuple.tuple2Equal
import scalaz.syntax.bind._
import scalaz.effect.IO
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.ReactVDom._
@dominictarr
dominictarr / papers.md
Last active November 17, 2024 09:23
Distributed Systems Papers

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf

@japgolly
japgolly / migration.sh
Last active August 29, 2015 14:11
scalajs-react 0.7.0 migration
#!/bin/bash
find . -name '*.scala' -exec perl -pi -e '
s/(?!<[a-zA-Z0-9_"])onblur(?![a-zA-Z0-9_"])/onBlur/g;
s/(?!<[a-zA-Z0-9_"])onchange(?![a-zA-Z0-9_"])/onChange/g;
s/(?!<[a-zA-Z0-9_"])onclick(?![a-zA-Z0-9_"])/onClick/g;
s/(?!<[a-zA-Z0-9_"])ondblclick(?![a-zA-Z0-9_"])/onDblClick/g;
s/(?!<[a-zA-Z0-9_"])onfocus(?![a-zA-Z0-9_"])/onFocus/g;
s/(?!<[a-zA-Z0-9_"])onkeydown(?![a-zA-Z0-9_"])/onKeyDown/g;
s/(?!<[a-zA-Z0-9_"])onkeyup(?![a-zA-Z0-9_"])/onKeyUp/g;
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links