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/tls" | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) |
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 | |
############################### | |
# pip install python-dateutil # | |
############################### | |
KEYVAULTS=$(az keyvault list --query "[].name" -o tsv) | |
# KEYVAULTS="<space_delimited_list_of_vault_names>" | |
for KEYVAULT in $KEYVAULTS; do | |
for CERT in $(az keyvault certificate list \ |
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/tls" | |
"fmt" | |
"time" | |
) | |
type target struct { | |
domain string |
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 ( | |
"bufio" | |
"fmt" | |
"net" | |
"os" | |
) | |
func readDomainsFromFile(filePath string) (domains []string, err error) { |
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
echo "This script will: | |
1) install all modules need to run web2py on Ubuntu/Debian | |
2) install web2py in /home/www-data/ | |
3) create a self signed sll certificate | |
4) setup web2py with mod_wsgi | |
5) overwrite /etc/apache2/sites-available/default | |
6) restart apache. | |
You may want to read this script before running 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
#!/bin/bash | |
latest_tags () { | |
echo "Latest tags!" | |
git describe --tags `git rev-list --tags --max-count=3` | |
echo "Status" | |
git status -uno | |
} |
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
const https = require('https'); | |
const fs = require('fs'); | |
const hostname = 'Todo'; | |
var outstanding_reqs = 0; | |
var got_continue = false; | |
function readTextFile() { |
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
# Terraform | |
alias trf='terraform' | |
## Terragrunt | |
alias trg='terragrunt' | |
alias trgfmt='terragrunt hclfmt' | |
alias trglint='find . -type f -not -path "*/\.*" | grep ".hcl" | terragrunt hclfmt' | |
alias trgcleancache='find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;' | |
function trginitall() { |
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 numpy as np | |
from scipy.optimize import fmin_cg | |
def cost(p, Y, R, alpha): | |
""" | |
Calculates collaborative filtering cost function. | |
Arguments | |
---------- |
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
from IPython.display import HTML | |
def hide_code(): | |
return HTML('''<script> | |
code_show=true; | |
function code_toggle() { | |
if (code_show){ | |
$("div.input").hide(); | |
} else { | |
$("div.input").show(); |
NewerOlder