Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
#!/bin/bash | |
# location: /usr/local/share/login_notify.sh | |
# /etc/pam.d/sshd | |
# add optional pam_exec.so /usr/local/share/login_notify.sh | |
function post_to_slack () { | |
# format message as a code block ```${msg}``` | |
SLACK_MESSAGE="\`\`\`$1\`\`\`" | |
new ssh-login channel | |
https://hooks.slack.com/services/<channel-url> |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
# python3 required | |
# tested on Windows 7 & Windows 10 | |
import winreg | |
try: | |
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion") | |
value = winreg.QueryValueEx(key, "DigitalProductId") | |
except OSError: | |
print(r"""Cannot find value "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId".""") |
These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.
Install the following packages:
apt-get install -y strongswan xl2tpd
Configure strong swan
The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0
Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.
This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.
Picking the right architecture = Picking the right battles + Managing trade-offs
npm install -g jspm@beta
jspm init
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |