$
로 시작하는 줄은, 한줄 한줄 복사해서 터미널에서 실행해주셔야합니다.- 터미널을 재시작 하여야 할 수도 있습니다.
- 재시작 후, 현재 작업하는 폴더로 다시 이동해주셔야합니다.
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
// clang -cc1 -analyzer-checker-help | |
// OVERVIEW: Clang Static Analyzer Checkers List | |
// USAGE: -analyzer-checker <CHECKER or PACKAGE,...> | |
// | |
// CHECKERS: | |
// alpha.core.BoolAssignment Warn about assigning non-{0,1} values to Boolean variables | |
// alpha.core.CallAndMessageUnInitRefArg | |
// Check for logical errors for function calls and Objective-C message expressions (e.g., uninitialized arguments, null function pointers, and pointer to undefined variables) | |
// alpha.core.CastSize Check when casting a malloc'ed type T, whether the size is a multiple of the size of T | |
// alpha.core.CastToStruct Check for cast from non-struct pointer to struct pointer |
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
#!/usr/bin/env bash | |
REMOTE_HOST=${1-"YOUR REMOTE HOST HERE"} | |
DEFAULT_API_FILE="$HOME/.ipfs/api" | |
API_FILE="${IPFS_PATH-$DEFAULT_API_FILE}" | |
if [ -e "$API_FILE" ]; then | |
echo "IPFS API is already running" | |
exit 1 | |
fi |
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
""" | |
pybble.py | |
Yup, you can run Python on your Pebble too! Go thank the good folks who | |
made Transcrypt, a dead-simple way to take your Python code and translate | |
it to *very* lean Javascript. In our case, instead of browser, we run it | |
on Pebble using their equally dead-simple Online IDE and Pebble.js library. | |
Here's a working example, it runs on a real Pebble Classic. |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
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
// tmux.c | |
// compile using: cc -o tmux tmux.c | |
// makeit setuid executable by: chmod +s tmux | |
// also change owner to desired user: [sudo] chown {usernamehere} tmux | |
// give it to guests' shell (passwd entry): guest::9999:99:guest user:/tmp:/opt/tmux | |
// you can delete password with passwd -du {login} | |
// allow empty passwords with PermitEmptyPasswords yes in sshd_config | |
// update (18 aug 2016): added dynamic owner change, for security ofc :) |
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/sh | |
## | |
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY > client.ovpn | |
## Orginial gist here https://gist.github.com/trovao/18e428b5a758df24455b | |
## | |
server=${1?"The server address is required"} | |
cacert=${2?"The path to the ca certificate file is required"} | |
client_cert=${3?"The path to the client certificate file is required"} |
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 asyncio | |
import aiohttp | |
from aiohttp import web | |
class WebsocketProxy(object): | |
def __init__(self, upstream_url): | |
self.upstream_url = upstream_url |
A simple asynchronous data store.
STATUS: This is a thought experiment, not a serious proposal. Would basic async storage like this be useful? With this plus some locking primitive, could you build Indexed DB?
Like Indexed DB:
- rich value types - store anything you can structured clone
- rich key types - Number, String, Date, Array (of other key types)
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
docker_auth: | |
image: "cesanta/docker_auth:stable" | |
command: --v=2 --alsologtostderr /config/auth_config.yml | |
ports: | |
- 5001:5001 | |
volumes: | |
- ./docker-auth/config:/config:ro | |
- ./docker-auth/logs:/logs |