jq is useful to slice, filter, map and transform structured json data.
brew install jq
| # Sample Nginx config with sane caching settings for modern web development | |
| # | |
| # Motivation: | |
| # Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
| # These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
| # and juicy version of your assets available. | |
| # At some point, however, you want to show your work to testers, your boss or your client. | |
| # After you implemented and deployed their feedback, they reload the testing page – and report | |
| # the exact same issues as before! What happened? Of course, they did not have developer tools | |
| # open, and of course, they did not empty their caches before navigating to your site. |
Below is my understanding of affine types and how they help us in Rust (unsure if I got this right - please correct if I am talking nonsense).
The issue is... How can we use the power of a type system so a compiler will block us from doing this wrong sequence of calls?
FILE *fp = NULL;
fclose(fp);
fp = fopen("...");
An idea is to "mirror" the states that the file variable goes through (unused/closed, opened) in the type system:
This guide is adapted from http://reboot.pro/topic/14547-linux-load-your-root-partition-to-ram-and-boot-it/
What you need:
| #!/usr/bin/env python3 | |
| # This script is designed to do one thing and one thing only. It will find each | |
| # of the FlateDecode streams in a PDF document using a regular expression, | |
| # unzip them, and print out the unzipped data. You can do the same in any | |
| # programming language you choose. | |
| # | |
| # This is NOT a generic PDF decoder, if you need a generic PDF decoder, please | |
| # take a look at pdf-parser by Didier Stevens, which is included in Kali linux. | |
| # https://tools.kali.org/forensics/pdf-parser. | |
| # |
| # coding: utf-8 | |
| u""" | |
| 线性数据结构, 栈, 队列, deques, 容器结构, 数据项之间存在相对的位置 | |
| """ | |
| class Stack(object): | |
| u""" | |
| 栈 先进后出 |
Reference:
sudo fdisk -l
| // Initialize an empty image | |
| dest := image.NewRGBA(image.Rect(0, 0, 800, 300)) | |
| // Draw a white background | |
| draw.Draw(dest, dest.Bounds(), &image.Uniform{color.White}, image.ZP, draw.Src) | |
| // Read the font | |
| fontBytes, err := ioutil.ReadFile(exeDir + "/DejaVuSans.ttf") | |
| if err != nil { |
sentrySENTRY_SECRET_KEY to random 32 char stringdocker-compose up -ddocker-compose exec sentry sentry upgrade to setup database and create admin userdocker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done laterdocker-compose restart sentry9000| import base64 | |
| import datetime | |
| import hashlib | |
| import hmac | |
| import io | |
| import json | |
| import mimetypes | |
| import os | |
| import uuid | |
| from urllib.error import HTTPError, URLError |