Skip to content

Instantly share code, notes, and snippets.

View usirin's full-sized avatar

Umut Sirin usirin

View GitHub Profile
@usirin
usirin / starter.html
Last active July 10, 2016 17:25 — forked from WebStormWeb/gist:2016353
HTML 5 Starter
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>New HTML5 Starter</title>
<!-- <link rel="stylesheet" media="screen" href="/style.css"> -->
</head>
<body>
</body>

Keybase proof

I hereby claim:

  • I am usirin on github.
  • I am umut (https://keybase.io/umut) on keybase.
  • I have a public key ASDuPmKKQqqh0k6ZqzwHT5vsKs50u3F29PRccsLiPLk_MAo

To claim this, I am signing this object:

@usirin
usirin / tmux.md
Created September 29, 2015 09:29 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

.vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
base64ToBinary = (uri) ->
raw = window.atob(uri)
rawLength = raw.length
array = new Uint8Array(new ArrayBuffer(rawLength))
for i in [0...rawLength]
array[i] = raw.charCodeAt i
return array
@usirin
usirin / cube_root.go
Last active August 29, 2015 14:01
gotour
package main
import (
"fmt"
"math/cmplx"
)
func Cbrt(x complex128) complex128 {
z := complex128(2)
s := complex128(0)
set rtp+=$HOME/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
""""""""""""""""""
"" LOW LEVEL SETUP
""""""""""""""""""
filetype on
filetype indent on
@usirin
usirin / show-session-variables.jsp
Created January 22, 2014 15:51
Show all session variables on JSP pages
Enumeration keys = session.getAttributeNames();
while (keys.hasMoreElements())
{
String key = (String)keys.nextElement();
out.println(key + ": " + session.getValue(key) + "<br>");
}
(function () {
/**
* Constructor of LoggedIn SVG
* object. Inherits its properties from
* caq.raphael.Main object.
* @return {caq.raphael.LoggedIn} Main paper to work on.
*/
caq.raphael.LoggedIn = function() {
// start inheritance from the Main class.
@usirin
usirin / center to screen
Created February 18, 2013 11:45
Centering a frame into screen.
// centering the images inside.
CGSize boundsSize = self.view.bounds.size;
CGRect frameToCenter = imageView.frame;
// center horizontally
if (frameToCenter.size.width < boundsSize.width)
frameToCenter.origin.x = (boundsSize.width - frameToCenter.size.width) / 2;
else
frameToCenter.origin.x = 0;