Skip to content

Instantly share code, notes, and snippets.

Csaba Csoma csoma

Block or report user

Report or block csoma

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
@csoma
csoma / DeskDotCom.scala
Created Feb 14, 2015
Desk.com integration in scala
View DeskDotCom.scala
// Desk.com integration based on http://dev.desk.com/guides/sso/
// License: Public domain
import scala.util.parsing.json.JSONObject
import org.apache.commons.codec.binary.Base64
import java.util.Arrays
import java.text.DateFormat
import java.text.SimpleDateFormat
import java.util.Date
@csoma
csoma / gist:de71e151607940d6e523
Last active Dec 22, 2015
Remove GitHub Wiki page elements before printing
View gist:de71e151607940d6e523

GitHub Wiki updated Bookmarklet (Sep 2014)

Note: Will not work with Firefox, see bug #866522

Wiki - Hides extra panels:


javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22https://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,%20%23wiki-rightbar,%20.gh-header-actions,%20.sunken-menu-contents,%20.site-footer').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D
@csoma
csoma / cpp11_maps_and_lists.cpp
Last active Jan 1, 2016
C++11 example of lightweight data modeling - based on https://gist.github.com/amontalenti/8114383
View cpp11_maps_and_lists.cpp
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
auto some_items = {1, 2, 3, 4};
for(auto item : some_items)
cout << item << endl;
@csoma
csoma / scala_maps_and_lists.scala
Last active Jan 1, 2016
Scala example of lightweight data modelling - based on https://gist.github.com/amontalenti/8114383
View scala_maps_and_lists.scala
object Main extends App {
val some_items = List(1, 2, 3, 4)
for (item <- some_items)
println(item)
val some_mapping = Map("ST"->"started", "IP"->"in progress", "DN"->"done")
for ((key, value) <- some_mapping)
println(key + "=>" + value)
}
You can’t perform that action at this time.