Skip to content

Instantly share code, notes, and snippets.

View kjk's full-sized avatar

Krzysztof Kowalczyk kjk

View GitHub Profile
@cryptix
cryptix / client.go
Created June 22, 2014 11:09
multipart upload with io.Pipe
package main
import (
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"runtime"
@praeclarum
praeclarum / Layout.cs
Created March 16, 2013 05:23
A C# syntax for NSLayoutConstraints.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using MonoTouch.UIKit;
namespace Async.iOS
{
public static class Layout
{
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@dmitshur
dmitshur / Default (OSX).sublime-keymap
Last active October 18, 2020 21:57
Sublime Text on OS X, make Cmd+F do the equivalent of Cmd+E followed by Cmd+F. Works for all selections, not just single line like "find_selected_text" setting.
[
// ... (existing content)
// Find selected text, even if it spans multiple lines (unlike "find_selected_text").
{ "keys": ["super+f"], "command": "run_multiple_commands", "args":
{ "commands":
[
// Only execute slurp if there's selected text.
{"command": "slurp_find_string", "context": "window", "condition": "selected_text"},
{"command": "show_panel", "args": {"panel": "find", "reverse": false}, "context": "window"}
using System;
using MonoTouch.UIKit;
using System.Drawing;
namespace Async.iOS
{
public class LayoutViewController : UIViewController
{
UITextField text;
UIButton button;
@henry0312
henry0312 / mingw.sh
Created November 27, 2011 06:19
Build MinGW Cross Compiler on Mac OS X Lion
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/GCC
PREFIX=$HOME/mingw
export PATH="$HOME/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir src
@dmitshur
dmitshur / Default (OSX).sublime-keymap
Created November 17, 2014 20:54
Add folder that contains current file to sidebar, for Sublime Text. Goes well with Cmd+.,Cmd+O of GoSublime until https://github.com/DisposaBoy/GoSublime/issues/553 is resolved.
[
// ... (existing content)
// Add folder that contains current file to sidebar.
{ "keys": ["f3"], "command": "add_to_project" },
// ...
]