Skip to content

Instantly share code, notes, and snippets.

View alisade's full-sized avatar

Ali Ardestani alisade

  • Los Angeles, CA
View GitHub Profile
curl -X POST --data-urlencode 'RequestData={"tokenID":"tk_XXXXXXXXXXXXXXXXXXXXXXXXXXX","actionType":"ApplyCertificate","certType":"DVSSL","domains":"server1.example.com","CSR":"-----BEGIN CERTIFICATE REQUEST-----\nMIICijCCAXICAQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx\nITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBANXFBaltFrZpRPAu3nPeXqOysVJcV/Ds4ZiY3Zuw\nnO5lqtWD2BczufYe6Y7xbf7JtbVfCcN0ML8kgyBkbOQmhnqiglpPzURSEdu5PbuO\nmSr4BXaKIUYlMbSJO0T9QE7z0kA1c1+37QdmZ/84ns+KxgwdRuIEtAe28NYaO7P0\nLVez8nZB1vN8WcdAjWyvUxCDzgxV4nwwc5sCSzf45RWmKMshV3P2EMKsEtazwM7O\nBLZSXUJKb1cWXAvN1yotONYkTEKbigJdhPLgC46fviM2zy7snl+Z1ISgWC8o/ROU\nvGJTPTFs2vCK6ArxqyLuDycFPSrnDpsVIxOTPDeXp5cy1dkCAwEAAaAAMA0GCSqG\nSIb3DQEBCwUAA4IBAQAcOhkQl++gu6dv6y+/62Rc3FfMni2TJAJsJkIosIPppZS9\n5WMQRIEaGGImbCT7PKSqPqwt6oJcMjHuqN/9ou95n7fs4lK8Z6+0wfaFJjS17Rwp\nmHgImpnX3gmH3NUs4f1tms8vFMAWXpfiZ/0BKauAJjzqd1VdKXr6tD6vBwioRCVO\nuKvx+pXFf13RYofw36NtSqJgYJkcgDvNufV72UC26mFPXXW4KQo9KVyDE2RY0A5d\nJqtCXOLeRk5x/ONkVm
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>EnableTransactions</key>
<true/>
<key>Label</key>
<string>org.isc.named</string>
listen_addresses = '*'
port = 15432
ssl = on
ssl_ciphers = 'HIGH:!aNULL:!MD5:!DHE'
shared_preload_libraries = 'pg_buffercache, pg_stat_statements'
pg_stat_statements.max = 2500
pg_stat_statements.track = all
@alisade
alisade / ec2_cloud.groovy
Created December 13, 2017 19:26 — forked from vrivellino/ec2_cloud.groovy
Jenkins EC2 Plugin Configuration via Groovy
/*
* Configure the Jenkins EC2 Plugin via Groovy Script
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin
*/
import hudson.model.*
import jenkins.model.*
import hudson.plugins.ec2.*
import com.amazonaws.services.ec2.model.InstanceType
@alisade
alisade / ec2_cloud.groovy
Last active March 29, 2018 00:01 — forked from halfb00t/ec2_cloud.groovy
Jenkins EC2 Plugin Configuration via Groovy
/*
* Configure the Jenkins EC2 Plugin via Groovy Script
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin
*/
import com.amazonaws.services.ec2.AmazonEC2
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder
import com.amazonaws.services.ec2.model.CreateKeyPairRequest
import com.amazonaws.services.ec2.model.CreateKeyPairResult
import com.amazonaws.services.ec2.model.KeyPair
import com.amazonaws.services.ec2.model.DeleteKeyPairRequest
@alisade
alisade / sns-to-slack.js
Created March 28, 2018 00:35 — forked from benyanke/sns-to-slack.js
AWS Lambda function for forwarding SNS notifications to Slack
// By Ben Yanke
// Based on https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752
// Handles CloudWatch alerts via SNS as Slack Attachments, instead of plaintext.
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...'; // put your webhook URL here// Added by Ben Yanke
@alisade
alisade / amazon-eks-nodegroup-role.yaml
Last active November 24, 2019 02:39
instance profile for eks worker nodes
AWSTemplateFormatVersion: "2010-09-09"
Description: Amazon EKS - Node Group Role
Resources:
NodeInstanceRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
#!/usr/bin/env python3
import boto3
import json
import uuid
import sys
from time import sleep
import backoff
from botocore import exceptions
if len(sys.argv) < 2 :
source ~/ssh-agent.sh
sshagent_init
@alisade
alisade / gist:42c681998d2e5d7867e80be645b6913f
Created April 1, 2021 15:07
jenkins parallel build agent
// Job == agent-build_pipeline
// build agent for linux/windows
currentBuild.description = env.TAG
def WORKER='worker-large'
def OS = [ 'redhat', 'debian' ]
def ARCH = [ '64' ]
def pipeline_branches = [:]
def JB='./jenkins/build'
def jbuild = { sh "bash ${JB}/build.sh" }
def provision = { sh "bash ${JB}/provision.sh" }