Skip to content

Instantly share code, notes, and snippets.

View inancgumus's full-sized avatar

İnanç Gümüş inancgumus

View GitHub Profile
@inancgumus
inancgumus / App.js
Created April 16, 2016 18:10 — forked from jesseditson/App.js
ES6 & React Sticky scroll higher-order component example
import React from 'react'
import MyComponent from '../components/MyComponent'
export default class App extends React.Component {
render() {
return <MyComponent topMargin="10"/>
}
}
@inancgumus
inancgumus / readability.js
Created August 12, 2016 20:29 — forked from jakedahn/readability.js
Readability.js
/*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */
/*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */
var dbg = (typeof console !== 'undefined') ? function(s) {
console.log("Readability: " + s);
} : function() {};
/*
* Readability. An Arc90 Lab Experiment.
* Website: http://lab.arc90.com/experiments/readability
@inancgumus
inancgumus / index.html
Last active August 26, 2016 23:56 — forked from anonymous/index.html
d3 scatterplot experiment // source http://jsbin.com/zizunel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>d3 starter kit</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.2.2/d3.js"></script>
<style id="jsbin-css">
/* Styles go here */
#!/usr/bin/env bash
#Code adapted from https://gist.github.com/yangj1e/3641843c758201ebbc6c (Modified to Python3.5)
cd ~
#wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.4.0-Linux-x86_64.sh
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.4.1-Linux-x86_64.sh
bash Anaconda3-2.4.1-Linux-x86_64.sh -b
echo 'PATH="/home/ubuntu/anaconda3/bin:$PATH"' >> .bashrc
. .bashrc
@inancgumus
inancgumus / xmlToJson.xslt
Created May 16, 2017 10:20
XML to JSON using XSLT
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8"/>
<xsl:template match="/*[node()]">
<xsl:text>{</xsl:text>
<xsl:apply-templates select="." mode="detect" />
<xsl:text>}</xsl:text>
</xsl:template>
@inancgumus
inancgumus / mgoTestExample
Created June 16, 2017 11:31 — forked from laeshiny/mgoTestExample.go
mgo test example
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Content struct {
@inancgumus
inancgumus / mongoDao
Created June 16, 2017 11:32 — forked from jameBoy/mongoDao
封装一个mgo的简单使用
package dao
import (
"gopkg.in/mgo.v2/bson"
"time"
"gopkg.in/mgo.v2"
"strings"
"log"
)
@inancgumus
inancgumus / Golang-binary-versioning.md
Created July 27, 2017 11:15 — forked from rafecolton/Golang-binary-versioning.md
Copypasta for easy versioning for your Go binaries

Golang Binary Versioning Trick

To use, place the code in version_trick.go in your project. Don't forget to change the namespace to match yours to the actual name of your package.

In addition to version_trick.go, there's a makefile-snippet, that includes the secret sauce for making this trick work. Be sure to change the package name there as well.

Enjoy!

P.S. Special thanks to @meatballhat by way of @syscomet for showing me this trick!

@inancgumus
inancgumus / about.md
Created July 31, 2017 11:16 — forked from alexaandru/about.md
Minimal Golang web stack.

Mini Go Web Stack

Description

This represents a proof of concept, minimal web stack. I used http://nicolasmerouze.com/build-web-framework-golang/ series of articles as a starting point and the goal was to keep the stack as minimal as possible while still being useful for practical purposes. And of course, use the standard library as much as possible and only integrate components compatible with it.

@inancgumus
inancgumus / http-benchmark.md
Created July 31, 2017 14:39 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)