export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get install unzip libpcre3 libpcre3-dev libssl-dev libpcrecpp0 zlib1g-dev debhelper dh-systemd libgeoip-dev autotools-dev libgd2-noxpm-dev libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev po-debconf libexpat-dev libxslt1-dev
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
#!/bin/bash | |
echo "This script will rebuild a Debian style package (deb) of latest stable" | |
echo "Nginx. The original deb is from nginx.org apt repository." | |
echo | |
echo "This will prompt you yes or no on a few changes to the build as well as" | |
echo "it will compile and package the latest Google NGX Pagespeed module." | |
echo | |
echo "This is built and tested on Ubuntu 12.04 LTS, fresh OS install." | |
echo "There are no guarantees, and I take no liability if it breaks, but it" |
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 ( | |
"fmt" | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
func demo(w http.ResponseWriter, r *http.Request) { |
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 ( | |
"crypto/rand" | |
"crypto/tls" | |
"crypto/x509" | |
"io/ioutil" | |
"log" | |
mr "math/rand" | |
"net/http" |
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
{ | |
"remote_addr":"***", | |
"name":"home", | |
"status_code":200, | |
"method":"GET", | |
"request_uri":"/", | |
"headers":{ | |
"Cache-Control":[ | |
"no-cache" | |
], |
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) 2006 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
#!/usr/bin/env bash | |
# This generates a password | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2015 Florin Patan | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
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
<?php | |
class human { | |
public function stop() { | |
print("https://youtu.be/DgvePeDIt3Y"); | |
} | |
} | |
function sad() { | |
$return = isset($GLOBALS["sad_called"]) && $GLOBALS["sad_called"] === true ? new human() : true; |
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
cloc $GOPATH/src | |
355977 text files. | |
146076 unique files. | |
265536 files ignored. | |
github.com/AlDanial/cloc v 1.70 T=1536.51 s (60.4 files/s, 22195.2 lines/s) | |
--------------------------------------------------------------------------------------- | |
Language files blank comment code | |
--------------------------------------------------------------------------------------- | |
Go 35916 1312637 1831205 8843502 |
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
$cwd = $PSScriptRoot+"\" | |
$gosdk = $cwd+"go" | |
$zip7 = $cwd+"7z" | |
$mingw = $cwd+"mingw64" | |
$gitdir = $cwd+"git" | |
$gopath = $cwd+"gopath" | |
# Install Go | |
if (-Not (Test-Path $gosdk)) { | |
echo "Installing Go into: "$gosdk |