Skip to content

Instantly share code, notes, and snippets.

View prog110's full-sized avatar

prog110 prog110

View GitHub Profile
curl -v -H "Cookie:ssid=48a1f862c16aed5ffe42265f0e0044b151d31446.1349046933.637835; geo=50.19.118.6%2CUS%2CWASHINGTON%2CSEATTLE%2C98144; L=tamil; B=bb5c4ba25d6186850cecda9ac9a35e7e" "/www.saavn.com/api.php?__call=search.getResults&q=Konjam%2520Koffee%2520Konjam%2520Kaadhal&p=1&_format=json&ctx=iphoneapp&_marker=false"
@prog110
prog110 / introrx.md
Last active August 29, 2015 14:24 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@prog110
prog110 / build.gradle
Last active August 29, 2015 14:24 — forked from pietrom/build.gradle
apply plugin: 'java'
dependencies {
runtime group: 'org.hibernate', name: 'hibernate-core', version: '4.3.8.Final'
}
configurations {
runtime.exclude group: 'xml-apis', module: 'xml-apis'
runtime.exclude group: 'org.hibernate.javax.persistence', module: 'hibernate-jpa-2.1-api'
}
@prog110
prog110 / indian.districts.geocoded.pincode.json
Created September 25, 2015 21:19 — forked from prashnts/indian.districts.geocoded.pincode.json
Indian District's GeoCoded Pin Code Data
{
"_description: Name of City, or Town": {
"State": "The Indian State under which this City/Town exists.",
"GeoCode": [
"Latitude",
"Longitude"
],
"PinCodes": [
"All",
"The",
@prog110
prog110 / sfphp.vcl
Created May 13, 2016 15:50 — forked from mtougeron/sfphp.vcl
Varnish VCL for Apr 9, 2013 SFPHP Meetup
# VCL for Varnish - How to cache your dynamic pages
# SFPHP.org Apr 9, 2013
# See: https://github.com/varnish/libvmod-header
# This varnish mod allows us to easily manipulate the Set-Cookie responses
import header;
probe varnish_probe {
.url = "/ping";
.timeout = 2s;
@prog110
prog110 / build.gradle
Created July 1, 2016 10:35 — forked from kolorobot/build.gradle
Spring Boot with overridden Spring Version (with dependency management)
buildscript {
ext {
springBootVersion = '1.2.5.RELEASE'
}
ext['spring.version'] = '4.2.1.RELEASE'
repositories {
mavenCentral()
}
@prog110
prog110 / README.md
Created January 23, 2017 13:09 — forked from boennemann/README.md
Pushing new releases of a legacy version with semantic-release

If you have a package where a lot of people are still using a legacy version of it you might want to keep pushing (security-)fixes to that "branch".

Let's say the "latest" version of your package is "5.4.0", but there is as significant amount of people still using "4.7.4" – the last version you released before doing "5.0.0".

You found a critical bug in "5.4.0" and push it as out as "5.4.1", but it applies to "4.7.4" as well and so you want to do "4.7.5".

Assuming you have semantic-release already set up, you can follow these steps to get that "4.7.5" legacy support release out.

  1. Go to the relevant commit: git checkout v4.7.4
  2. Create a new branch from it: git checkout -b 4.x (You can choose any branch name, just make sure to use the same in step 3)
@prog110
prog110 / google_art_project.rb
Created March 6, 2017 08:00 — forked from ionas/google_art_project.rb
Google Art Project fullsize image downloader. Specify the page URL and the tiles are downloaded, stitched and trimmed.
# Google Art Project fullsize image downloader.
# By Henrik Nyh <http://henrik.nyh.se> 2011-02-05 under the MIT license.
# Requires Ruby and ImageMagick.
#
# Usage e.g.:
# ruby google_art_project.rb http://www.googleartproject.com/museums/tate/portrait-of-william-style-of-langley-174
#
# You can specify multiple URLs on the command line, separated by space.
# Or you can specify no URLs on the command line and instead list them at the end of this file, one on each line,
# with "__END__" before the list.
@prog110
prog110 / README.md
Created May 20, 2018 23:40 — forked from bollwyvl/README.md
RevealJS SVG fragment presenter

SVG fragment builds for reveal.js

Basic use case

  • make an SVG (maybe in inkscape)
    • save it someplace reveal.js can find it (maybe next to your presentation)
    • figure out how to identify them (maybe use named layers)
  • in reveal.js/index.html
    • add reveal-svg-fragment.js as a dependency
    • in a <section> of reveal.js markup
  • add data-svg-fragment="" to something, e.g.

Installing Nvidia Graphics Driver and Cuda on Ubuntu

Remove any previously installed Nvidia drivers

$ sudo apt-get remove --purge nvidia-*
$ sudo apt-get autoremove
$ sudo apt-get autoclean

You can choose to install CUDA drivers from .deb file or .run file