This file contains hidden or 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
| # config to don't allow the browser to render the page inside an frame or iframe | |
| # and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | |
| # if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | |
| # https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | |
| add_header X-Frame-Options SAMEORIGIN; | |
| # when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | |
| # to disable content-type sniffing on some browsers. | |
| # https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
| # currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |
This file contains hidden or 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
| /* | |
| * Getting timelines by Twitter Streaming API | |
| */ | |
| #include <iostream> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <oauth.h> | |
| #include <curl/curl.h> |
This file contains hidden or 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 <dirent.h> | |
| #include <iterator> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <sstream> | |
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <string> | |
| #include <sys/stat.h> | |
| #include <syslog.h> |
This file contains hidden or 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
| yahtzee@fagballs:~# tor --list-torrc-options | |
| Aug 24 22:16:31.701 [notice] Tor v0.2.4.20 (git-0d50b03673670de6) running on Linux with Libevent 2.0.21-stable and OpenSSL 1.0.1f. | |
| Aug 24 22:16:31.701 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning | |
| AccountingMax | |
| AccountingStart | |
| Address | |
| AllowDotExit | |
| AllowInvalidNodes | |
| AllowNonRFC953Hostnames | |
| AllowSingleHopCircuits |
This file contains hidden or 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
| # Load posh-git example profile | |
| . '~\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1' | |
| $GitPromptSettings.EnableFileStatus = $false | |
| $global:CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
| function Prompt() { | |
| Write-Host ("PS " + $(get-location) ) -nonewline -foregroundcolor Magenta | |
| Write-VcsStatus |
This file contains hidden or 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 <iostream> | |
| #include <string> | |
| #include <curl/curl.h> | |
| static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
| { | |
| ((std::string*)userp)->append((char*)contents, size * nmemb); | |
| return size * nmemb; | |
| } |
This file contains hidden or 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
| #!/bin/sh | |
| # First, build libc++ See <http://libcxx.llvm.org/>, "Build on Linux using CMake | |
| # and libsupc++." and substitute libsupc++ for libstdc++. NOTE: You'll probably | |
| # need to explicitly link libsupc++ when you compile your own code! | |
| # | |
| # Next, download Boost and extract it somewhere. Set SRC_DIR to that location. | |
| SRC_DIR=$HOME/src/boost_1_55_0 | |
| # Set this to be the install prefix. "/usr" is also a good choice. |
This file contains hidden or 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) 2011-2012 Yaroslav Stavnichiy <[email protected]> | |
| // Copyright (C) 2014 OnlineCity Aps <[email protected]> | |
| // | |
| // Inspired by: https://bitbucket.org/yarosla/nxweb/src/tip/src/lib/daemon.c | |
| // | |
| // Licensed under The MIT License: | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights |
This file contains hidden or 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
| #! /bin/bash | |
| # | |
| # getopt.sh: | |
| # functions like getopts but do long-named options parsing | |
| # and support optional arguments | |
| # | |
| # Version 1.0 1997 by Grigoriy Strokin ([email protected]), Public Domain | |
| # Date created: December 21, 1997 | |
| # Date modified: December 21, 1997 | |
| # |