test
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
This is a test gist. |
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
def function | |
"this is a function" | |
end |
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
@import url(http://fonts.googleapis.com/css?family=Roboto); | |
@import "materialize/components/color"; | |
$primary-color: color("blue", "lighten-2") !default; | |
@import "materialize"; | |
@import "font-awesome-sprockets"; | |
@import "font-awesome"; | |
html, body, #map-canvas { | |
height: 100%; | |
margin: 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
function deleteDrawing(deleteDiv,shape){ | |
var controlUI = document.createElement('div'); | |
controlUI.className = "waves-effect waves-light btn button" | |
controlUI.innerHTML = "Clear Shape"; | |
deleteDiv.appendChild(controlUI); | |
google.maps.event.addDomListener(controlUI,'click',function(){ | |
if (selectedShape) { | |
selectedShape.setMap(null); | |
} |
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
class Github | |
HOST = 'https://api.github.com' | |
ACCESS_TOKEN_URL = 'https://github.com/login/oauth/access_token' | |
DATA_URL = HOST + '/user' | |
attr_reader :data, :access_token | |
def initialize(params) | |
@params = { |
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
class Stack | |
BASE = "https://api.stackexchange.com/" | |
TAGS = "/2.2/tags" | |
ACCESS_KEY = ENV['STACK_KEY'] | |
WRITE_FILE_PAGE = File.expand_path("~/Desktop/tags.txt") | |
WRITE_ALL_FILE = File.expand_path("~/Desktop/all_tags.txt") | |
attr_reader :tags |
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
def index | |
params[:page] ? page = params[:page].to_i : page = 1 | |
sort = params[:sort] | |
if params[:tags] | |
stripped_tags = params[:tags].gsub(/\s+/, "") | |
tags = stripped_tags.split(",") | |
end | |
if page == 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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin admin@example.com | |
ServerName your_domain.com | |
ServerAlias www.your_domain.com | |
DocumentRoot /var/www/html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/apache.crt |
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
openssl req \ | |
-newkey rsa:2048 -nodes -keyout files/nginx.key \ | |
-x509 -days 365 -out files/nginx.crt | |
- name: configure webserver with nginx and tls | |
hosts: webservers | |
sudo: True | |
vars: | |
key_file: /etc/nginx/ssl/nginx.key | |
cert_file: /etc/nginx/ssl/nginx.crt |
OlderNewer