Skip to content

Instantly share code, notes, and snippets.

View ryanlelek's full-sized avatar
🔮
Like Magic

Ryan Lelek ryanlelek

🔮
Like Magic
View GitHub Profile
@ryanlelek
ryanlelek / NAME.service
Last active July 14, 2024 20:38
systemd service start on boot
[Unit]
Description=myservice
[Service]
Type=simple
User=user
Group=user
Environment=SOMEVAR=myvalue
WorkingDirectory=/home/user
ExecStart=/home/user/scripts/script.sh
@ryanlelek
ryanlelek / main.go
Created October 1, 2020 17:04 — forked from hashamali/main.go
Use UUID with GORM.
package main
import (
"fmt"
"log"
"time"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/satori/go.uuid"
image: ruby2.0.0
script:
- cp config/database.example.yml config/database.yml
- bundle install
- psql -c 'create extension hstore;' -U postgres -h 127.0.0.1
- psql -c 'create role exmu with superuser login;' -U postgres -h 127.0.0.1
- psql -c 'create database exmu_test;' -U postgres -h 127.0.0.1
- bundle exec rake db:test:prepare
- bundle exec rspec spec
services:
@ryanlelek
ryanlelek / .drone.yml
Created June 4, 2020 01:18 — forked from d0x2f/.drone.yml
.drone.yml example
workspace:
base: /build
pipeline:
dbnode1:
detach: true
image: mysql/mysql-cluster:7.5
commands:
- sleep 5
@ryanlelek
ryanlelek / droneci.json
Created June 4, 2020 01:17 — forked from dcoxall/droneci.json
Cloudformation template to deploy drone to AWS using EC2 Container Service
{
"Description": "Drone Continuous Integration (drone.io)",
"Parameters": {
"VPC": {
"Type": "AWS::EC2::VPC::Id",
"Description": "The VPC that needs provisioning"
},
"Subnets": {
"Type": "List<AWS::EC2::Subnet::Id>",
@ryanlelek
ryanlelek / template.j2
Created May 13, 2018 16:16
AnsibleTutorials Template Patch (Temp)
# Regular Variable
{{ regular_variable }}
# If / Else
{% if use_hyperdrive == false %}
Hyperdrive is not enabled
{% else %}
Hyperdrive is enabled!
{% endif %}
@ryanlelek
ryanlelek / Vagrantfile
Created January 16, 2016 06:42 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
@ryanlelek
ryanlelek / haproxy.conf
Last active August 29, 2015 14:25 — forked from dsuch/haproxy.conf
# At most 10 concurrent connections from a client
acl too_fast fe_sess_rate ge 10
# Matches any path beginning with a given prefix
acl bursts_inclined path_beg -i /client1
# Effectively working as a delay mechanism for clients that are too fast
tcp-request inspect-delay 1000ms
# Fast-path - accept connection if it's not this troublesome client
@ryanlelek
ryanlelek / index.html
Created March 5, 2015 23:38
Bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Starter Template for Bootstrap</title>