Skip to content

Instantly share code, notes, and snippets.

View akrisiun's full-sized avatar

Andrius K akrisiun

View GitHub Profile
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@wallymathieu
wallymathieu / CSharp_loose.flt
Created November 18, 2011 12:12
Winmerge filter (svn + git)
## This is a directory/file filter for WinMerge
## This filter suppresses various binaries found in Visual C# source trees
name: Visual C# loose
desc: Suppresses various binaries found in Visual C# source trees
## This is an inclusive (loose) filter
## (it lets through everything not specified)
def: include
## Filters for filenames begin with f:
@tshinnic
tshinnic / httpclnt03.js
Created December 1, 2011 00:40
Example of binding socket for nodejs HTTP client request (for discussion only)
// One shot request HTTP client - show local/remote addresses
//
// Attempt to use a modified Agent that has own self.createConnection()
// that binds the client socket to a particular address.
var assert = require('assert'),
dns = require('dns'),
http = require('http'),
net = require('net'),
util = require('util');
internal static class NativeMethods
{
[DllImport("XpsPrint.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
public static extern int StartXpsPrintJob(string printerName, string jobName, string outputFileName, IntPtr progressEvent, SafeWaitHandle completionEvent,
[MarshalAs(UnmanagedType.LPArray)] byte[] printablePagesOn, int printablePagesOnCount, out IXpsPrintJob xpsPrintJob, out IXpsPrintJobStream documentStream, out IXpsPrintJobStream printTicketStream);
}
[ComImport, Guid("E974D26D-3D9B-4D47-88CC-3872F2DC3585"), ClassInterface(ClassInterfaceType.None)]
internal class XpsOMObjectFactory
{
@vsergeev
vsergeev / beagle_elfs.md
Created April 15, 2012 09:45
Minimalist "Embedded Linux from Scratch" Beaglebone Distribution Build

Busybox "Embedded Linux from Scratch" Distribution for the Beaglebone

Prepare your Build Sandbox

$ mkdir -p beaglelfs/{sources,rootfs_install,boot_mnt,rootfs_mnt}

Acquire an ARM Toolchain

Download the latest i686 Binary TAR of the ARM GNU/Linux (glibc-based) Lite Toolchain:

@wm
wm / Powerline.md
Last active September 6, 2022 00:55
Installing powerline on Mac OSX. The following was done in version Version 10.8.2

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew

@DotNetNerd
DotNetNerd / PhantomRunner.cs
Created May 23, 2013 11:20
Grabbing a site in C# using phantomJS
class Program
{
static void Main(string[] args)
{
var grabby = new Grabby();
string output = grabby.Grab("http://www.dotnetnerd.dk/cv");
Console.WriteLine(output);
File.WriteAllText("c:\\test.html", output);
}
@trailmax
trailmax / HttpSimulator.cs
Created November 21, 2013 23:03
HttpSimulator code from Phil Haak (http://haacked.com/archive/2007/06/19/unit-tests-web-code-without-a-web-server-using-httpsimulator.aspx) This version is StyleCop-ed. Also backing-up in case that page dies. Linked to my blog-post
using System;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Configuration;
using System.Web.Hosting;
using System.Web.SessionState;
@seyhunak
seyhunak / request.swift
Last active February 4, 2020 06:14
NSURLRequest in Swift
import Foundation
class Request : NSObject {
var url : NSURL? = nil
var request : NSMutableURLRequest? = nil
var response : NSHTTPURLResponse? = nil
var data: NSMutableData? = nil
var done: (NSError?, NSData, NSString?) -> () = { (_, _, _) -> () in }
@jirutka
jirutka / -README.md
Last active October 31, 2023 09:07
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings