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
locals { | |
prefix = "random-ec2-instance" | |
} | |
provider "aws" { | |
region = "eu-central-1" | |
} | |
data "aws_vpc" "default" { | |
default = 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
server_name example.com; | |
location / { | |
# Angular/React/whatever frontend | |
root /home/example/frontend/dist; | |
try_files $uri @prerender; | |
} | |
# config for Node.js prerenderer | |
location @prerender { |
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 os | |
import sys | |
host1 = 'source.example.com' | |
host2 = 'destination.example.com' | |
cos = 'cos-of-group-for-the-account' | |
data = """[email protected] password | |
[email protected] password3 | |
[email protected] password2""" |
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 sys | |
import os | |
import re | |
from os import listdir | |
from os.path import isfile, join | |
def download_wp_plugin(name, path, temp_path): | |
url = 'https://wordpress.org/plugins/%s/' % name | |
import urllib2 |
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 | |
set -e | |
# install Xcode Command Line Tools | |
#xcode-select | |
if [ $? -eq 1 ]; then | |
# https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh | |
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; | |
PROD=$(softwareupdate -l | | |
grep "\*.*Command Line" | |
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
brew install ant | |
sudo pip install markdown | |
sudo pip install pycrypto | |
sudo pip install pyopenssl | |
sudo pip install pyyaml | |
sudo pip install Pygments | |
# install android SDK ver 21 | |
... |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
apt-get install -y linux-headers-$(uname -r) | |
cd /tmp | |
wget http://download.virtualbox.org/virtualbox/4.3.20/VBoxGuestAdditions_4.3.20.iso | |
mount -o loop,ro VBoxGuestAdditions_4.3.20.iso /mnt | |
/mnt/VBoxLinuxAdditions.run |
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 requests | |
class Mobitel_SMS: | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password | |
def _send_request(self, action, body): | |
envelope = """<?xml version="1.0" encoding="utf-8"?> |
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 "inc/hw_gpio.h" | |
#include "inc/hw_memmap.h" | |
#include "inc/hw_sysctl.h" | |
#include "inc/hw_types.h" | |
#include "driverlib/gpio.h" | |
#include "driverlib/rom.h" | |
#include "driverlib/sysctl.h" | |
#include "inc/hw_types.h" | |
#include "inc/hw_memmap.h" |
NewerOlder