An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| launchctl unload -w /System/Library/LaunchDaemons/com.apple.spindump.plist |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
| import string | |
| import sys | |
| import logging | |
| import json | |
| from flask import Flask | |
| from flask import Response, request | |
| logger = logging.getLogger(__name__) | |
| logger.info("Stackdriver webhook-sample starting up on %s" % (string.replace(sys.version, '\n', ' '))) |
Statix is a stand-alone Bash script aimed at generating full-featured, routable static websites from reusable HTML snippets. It features the most basic templating engine ever possible but allows to organize your content in a SEO-friendly way. All Statix-based websites contain these parts:
This script is also lightweight. Aside from some standard file management commands such as cp, mkdir and rm, the only serious dependency for Statix is GNU Grep compiled with PCRE support (i.e. the version that supports -P flag, included in most Linux distributions).
| # 10_basic.py | |
| # 15_make_soup.py | |
| # 20_search.py | |
| # 25_navigation.py | |
| # 30_edit.py | |
| # 40_encoding.py | |
| # 50_parse_only_part.py |
Preconditions:
- POSIX or Windows system
- Install Docker
- A GitHub repo that already builds on Travis
Postcondition:
| sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13, | |
| sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality | |
| that has long been provided by dscl and adds new features available only in 10.13. | |
| sysadminctl can be used to change user passwords, create new users (including automatically provisioning | |
| the user home folder) or check the status of a new-to-10.13 security feature named SecureToken. | |
| SecureToken is a user attribute like password type or user home location. SecureToken is not publicly | |
| documented by Apple so it is not possible to provide a full technical description, but in practice one | |
| needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can | |
| unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not |
| from lxml import html, etree | |
| import datetime | |
| import requests | |
| import re | |
| import os | |
| import sys | |
| import unicodecsv as csv | |
| import argparse | |
| import json | |
| # from exceptions import ValueError |