Skip to content

Instantly share code, notes, and snippets.

View tinkerware's full-sized avatar

Cagatay Kavukcuoglu tinkerware

View GitHub Profile
@rustyio
rustyio / subgit
Created January 24, 2010 18:48
subgit
#!/usr/bin/env sh
# subgit
#
# A tiny wrapper around git to help you manage
# Git sub-projects easily, safely, and simply.
#
# Created by Rusty Klophaus (@rklophaus)
#
# See http://rklophaus.com/subgit for usage.
@rustyio
rustyio / subhg
Created January 24, 2010 18:54
subhg
#!/usr/bin/env sh
# subhg
#
# A tiny wrapper around hg to help you manage
# Mercurial sub-projects easily, safely, and simply.
#
# Created by Rusty Klophaus (@rklophaus)
#
# See http://rklophaus.com/subhg for usage.

Building the BSD-port version of OpenJDK (Java 1.7) on Mac OS X

Take a look at the comments and code in update.sh.

$ source update.sh

I use update-usr-local.sh after a successful build to copy the new JVM into /usr/local.

I add pickjdk.sh into my ~/.bash_profile to allow easy switching between multiple JVMs.

@briandealwis
briandealwis / gist:782862
Created January 17, 2011 13:55 — forked from spullara/gist:782523
One-liner to turn jar with Main-Class into executable shell script
# turn a jar with a Main-Class into a stand alone executable
(echo '#!/usr/bin/env java -jar'; cat blahblah.jar) > blah
# turn a jar with a particular main clas into a stand alone executable
(echo '#!/usr/bin/env java -jar package.MainClass'; cat blahblah.jar) > blah
anonymous
anonymous / file1.ab
Created May 7, 2011 19:44
cagatayk@Odyssey ~
$ for dep in $(brew deps imagemagick); do brew remove --force $dep; done
Uninstalling jasper...
Uninstalling jpeg...
Uninstalling libtiff...
Uninstalling little-cms...
cagatayk@Odyssey ~
$ brew install imagemagick
Also installing dependencies: jpeg, libtiff, little-cms, jasper
@matsev
matsev / BeanWiringTest.java
Created November 27, 2011 14:12
Creating Spring FactoryBeans for Mock Objects
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("failing-mockito-config.xml")
public class BeanWiringTest {
@Autowired
SomeClass someClass;
@Autowired
SomeDependency someDependencyMock;
@emk
emk / apache-logs-hive.sql
Created January 3, 2012 18:01
Apache log analysis with Hadoop, Hive and HBase
-- This is a Hive program. Hive is an SQL-like language that compiles
-- into Hadoop Map/Reduce jobs. It's very popular among analysts at
-- Facebook, because it allows them to query enormous Hadoop data
-- stores using a language much like SQL.
-- Our logs are stored on the Hadoop Distributed File System, in the
-- directory /logs/randomhacks.net/access. They're ordinary Apache
-- logs in *.gz format.
--
-- We want to pretend that these gzipped log files are a database table,
@viktorklang
viktorklang / minscalaactors.scala
Last active March 25, 2024 19:01
Minimalist Scala Actors
/*
Copyright 2012-2021 Viktor Klang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@nrrrdcore
nrrrdcore / border.css
Created May 2, 2012 20:44
Faded/Gradient Borders in Pure CSS
.border-container {
width: 28%; /* border will be on the left on this container */
float: right;
overflow: hidden; /* only needed if floating container */
min-height: 600px; /* static height if you want your container to be taller than its content */
-moz-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
-webkit-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
border-width: 0 0 0 1px;
-webkit-border-image:
@Kalyse
Kalyse / arrowgasm.less
Created May 9, 2012 13:55
LessCSS Mixing for Providing Arrows
.arrowgasm(@position: top, @size : "4px", @background-color : #88b7d5, @border-width: "2px", @border-color : #c2e1f5, @arrowClass : "arrow_box"){
(~".@{arrowClass}") {
position: relative;
background: @background-color;
border: @size solid @border-color;
}
(~".@{arrowClass}:after"), (~".@{arrowClass}:before") {
bottom: 100%;
border: solid transparent;