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 <tensorflow/c/c_api.h> | |
int main() { | |
printf("Hello from TensorFlow C library version %s\n", TF_Version()); | |
return 0; | |
} |
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
# first, compile your code with the `-g` flag | |
# this will get you line numbers | |
# now launch gdb with whatever arguments your program uses | |
gdb --args path/to/executable -every -arg you can=think < of | |
# to start debugging | |
run | |
# to get a stack trace |
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
<!DOCTYPE html> | |
<!-- Created by pdf2htmlEX (http://github.com/coolwanglu/pdf2htmlEX) --> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="generator" content="pdf2htmlEX"/> | |
<style type="text/css"> | |
/* Base CSS */ | |
/* Copyright 2012 Lu Wang <coolwanglu@gmail.com> */ | |
#pdf-outline { /* PDF Outline */ |
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
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
################################################################## | |
Installing and Configuring SmartOS on a budget server (with a /29) | |
################################################################## | |
# if you find this gist useful, please star it | |
# please be aware that budget hosting companies usually cut corners somewhere, |
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
function escapeRegEx(str) { | |
return str.replace(/([\^\$\(\)\<\>\|\\\{\[\]\.\*\+\?])/g, '\\$1'); | |
} |
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
# filter for .c files | |
for f in *.c | |
do | |
#filename | |
echo $f | |
# filename without extension | |
echo ${f%.*} | |
# extension |
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
ssh -f user@example.com -L 5555:example.com:444 -N |
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
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 |