-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string getIPAddress(){ | |
string ipAddress="Unable to get IP Address"; | |
struct ifaddrs *interfaces = NULL; | |
struct ifaddrs *temp_addr = NULL; | |
int success = 0; | |
// retrieve the current interfaces - returns 0 on success | |
success = getifaddrs(&interfaces); | |
if (success == 0) { | |
// Loop through linked list of interfaces | |
temp_addr = interfaces; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define SMARTY_SIZE_INIT 16 | |
typedef struct { | |
char * str; // a null terminated C string | |
char * end; // a pointer to the null byte, to be able to repeatedly append | |
// without using strlen() every time. | |
size_t size; // currently allocated size for *str, so we know when we |
This was originally posted on 2011-12-18 to http://andrewho.co.uk/weblog/patching-gnu-screen-on-mac-os-x-for-vertical-split
The ability in GNU screen to vertically split a display so that two windows are visible side-by-side (which is what GNU screen means by "vertical split") is not available in the latest stable release (4.0.3). It is, however, available in the latest HEAD slated for screen 4.1. Various distributions such as debian have merged the upstream changes into their stable versions; Mac OS X (10.7) is not one of them. Here's how to compile it in.
First, clone the latest HEAD (450e8f38 at the moment):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// perform the Simplest Color Balancing algorithm | |
void SimplestCB(Mat& in, Mat& out, float percent) { | |
assert(in.channels() == 3); | |
assert(percent > 0 && percent < 100); | |
float half_percent = percent / 200.0f; | |
vector<Mat> tmpsplit; split(in,tmpsplit); | |
for(int i=0;i<3;i++) { | |
//find the low and high precentile values (based on the input percentile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"archive/zip" | |
"fmt" | |
"io/ioutil" | |
) | |
type myCloser interface { | |
Close() error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"archive/tar" | |
"compress/gzip" | |
"flag" | |
"fmt" | |
"io" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2015 Naios <naios-dev@live.de> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
OlderNewer