"cocotte bag"
: exact match"* is thicker than water"
:*
to replace a phrase inside exact matchjaguar -car
: minus to filter out matchessite:time.com google
: search on site, you don't need '.', e.g. 'site:gov'define:bae
: check definition, even for slang$0..$50
: numeric range (ignore$
)"inbound marketing" ~professional
: synonymsrelated:nationalgeographic.com
: similar sites
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
{ | |
"basics": { | |
"name": "Joe Doe", | |
"label": "", | |
"image": "", | |
"email": "john@gmail.com", | |
"phone": "(912) 555-4321", | |
"url": "https://johndoe.com", | |
"summary": "A summary of John Doe…", | |
"location": { |
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
** | |
* | |
******* | |
* | |
***** | |
* | |
****** | |
---------- | |
*** |
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
# ------------------------------------------------ | |
# Config files are located in /etc/wireguard/wg0 | |
# ------------------------------------------------ | |
# ---------- Server Config ---------- | |
[Interface] | |
Address = 10.10.0.1/24 # IPV4 CIDR | |
Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
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/bash | |
cd /tmp/ | |
wget https://github.com/vim/vim/archive/v8.1.1244.tar.gz | |
tar xzf v8.1.1244.tar.gz | |
cd vim-8.1.1244/ | |
./configure --enable-perlinterp --enable-rubyinterp --enable-python3interp --enable-luainterp | |
make | |
make install |
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
* `apt` cannot be followed by module name directory, have to use `name` option | |
* `import_playbook` is not a task, do not put under tasks | |
* Don't use `copy`, it is slow, use `synchronize` instead | |
* `shell` doesn't handle symlink chdir correctly, it's gonna chdir you to resolved path. |
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
Django-REST-Framework | |
Serializers | |
* Notice that we're using hyperlinked relations in this case, with HyperlinkedModelSerializer. You can also use primary key and various other relationships, but hyperlinking is good RESTful design | |
* HyperlinkedModelSerializer: | |
class UserSerializer(serializers.HyperlinkedModelSerializer): | |
class Meta: | |
model = User | |
fields = ('url', 'username', 'email', 'groups') |
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
Django | |
Model: | |
Class Based Model: | |
* class MODEL(models.Model): | |
FIELD1 = models.AFIELD([FIELDNAME], [default=VALUE]) | |
def __str__(self): | |
... | |
Fields: |
NewerOlder