start new:
tmux
start new with session name:
tmux new -s myname
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
from itertools import product | |
def score(self, other): | |
first = len([speg for speg, opeg in zip(self, other) if speg == opeg]) | |
return first, sum([min(self.count(j), other.count(j)) for j in 'ABCDEF']) - first | |
possible = [''.join(p) for p in product('ABCDEF', repeat=4)] | |
results = [(right, wrong) for right in range(5) for wrong in range(5 - right) if not (right == 3 and wrong == 1)] | |
def solve(scorefun): |
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
tell application "Terminal" | |
activate | |
do script "cd ~/dev/src/Content3/content_web/content_web" | |
do script "workon content" in front window | |
do script "sh admin.sh local runserver" in front window | |
my makeTab() | |
do script "cd ~/dev/src/Content3/content_web/content_web/public" in tab 2 of front window | |
do script "workon content" in tab 2 of front window | |
do script "sh admin.sh local runserver localhost:8001" in tab 2 of front window |
We like to have our interns and co-ops summarize their experiences before they finish. Here are some guidelines to help develop a useful presentation.
To be clear, your retrospective will have little impact on HubSpot's decision to make an offer. However, approaching your presentation this way will help you focus on making an impact that will give you a jump start on your career if you do join HubSpot in the future.
This is your chance to put yourself out there to make some very valuable professional connections. When you're choosing what to put on your slides, always think: "Will telling people this make them want to work with me again?"
#!/bin/sh | |
BOOT2DOCKER_CERTS_DIR=/var/lib/boot2docker/certs | |
CERTS_DIR=/etc/ssl/certs | |
CAFILE=${CERTS_DIR}/ca-certificates.crt | |
for cert in $(/bin/ls -1 ${BOOT2DOCKER_CERTS_DIR}); do | |
SRC_CERT_FILE=${BOOT2DOCKER_CERTS_DIR}/${cert} | |
CERT_FILE=${CERTS_DIR}/${cert} | |
HASH_FILE=${CERTS_DIR}/$(/usr/local/bin/openssl x509 -noout -hash -in ${SRC_CERT_FILE} 2>/dev/null) |
''' | |
intro.py | |
Managing kubernetes objects using common resource operations with the python client | |
----------------------------------------------------------------------------------------------- | |
Some of this operations include; | |
- **`create_xxxx`** : create a resource object. Ex **`create_namespaced_pod`** and **`create_namespaced_deployment`**, for creation of pods and deployments respectively. This performs operations similar to `kubectl create`. | |
# An example to get the remaining rate limit using the Github GraphQL API. | |
import requests | |
headers = {"Authorization": "Bearer YOUR API KEY"} | |
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
if request.status_code == 200: |
Jinja2 is a templating engine and as such its primary use case is to render templates into text; which is usually HTML output saved into text file.
Consider the following Ansible play that uses Jinja2 templates to evaluate expressions:
- hosts: localhost
gather_facts: no