From: https://github.com/FallibleInc/security-guide-for-developers
- Use HTTPS everywhere.
- Store password hashes using
Bcrypt
(no salt necessary -Bcrypt
does it for you).
From: https://github.com/FallibleInc/security-guide-for-developers
Bcrypt
(no salt necessary - Bcrypt
does it for you).#!/bin/bash | |
set -e -u -o pipefail | |
{ | |
echo 'digraph G {' | |
brew list | while read cask; do | |
printf '"%s";\n' $cask | |
brew deps $cask | while read dep; do |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# Based on http://frantic.im/notify-on-completion and https://gist.github.com/jamesmacaulay/860763 | |
# Notify on completion | |
function f_notifyme { | |
LAST_EXIT_CODE=$? | |
CMD=$(fc -ln -1) | |
terminal-notifier -title "$CMD" -message "Status code: $LAST_EXIT_CODE" & | |
} | |
save_preexec_time() { | |
export PREEXEC_CMD="$(history | tail -1 | sed 's/ *[0-9]* *//')" |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
import shutil | |
import copy | |
from datetime import datetime | |
# This script finds all channels, private channels and direct messages | |
# that your user participates in, downloads the complete history for |
<?php | |
if (!isset($_GET['user'])) { | |
if (!isset($_GET['hashtag'])) { | |
exit('Not a valid RSS feed. You didn\'nt provide an Instagram user or hashtag. Send one via a GET variable. Example .../instarss.php?user=snoopdogg'); | |
} | |
} | |
if (isset($_GET['user']) && isset($_GET['hashtag'])) { | |
exit('Don\'t request both user and hashtag. Request one or the other.'); |
exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.
If Disk Utility is unable to repair, consider trying this:
diskutil list
to find the right drive id.disk1s1
sudo fsck_exfat -d <id from above>
. eg sudo fsck_exfat -d disk1s3
-d
is debug so you'll see all your files output as they're processed.##Где трепаться?
http://telegram.me/klavaorgwork - Телеграм, вопросы разработки
##Железо
####Приобретение свитчей
#!/bin/env bash | |
## Needs `jq` (https://stedolan.github.io/jq/) on PATH | |
## and a personal gogs token of yours. | |
## Obtain token from https://git.example.com/user/settings/applications | |
## Usage: | |
## ./migrate.sh $clone_url $project_name [$optional_group] | |
## Migrate a repository to gogs into the user namespace of the token-user | |
## ./migrate.sh [email protected]:group/repo.git repo | |
## Migrate a repository to gogs into the group namespace `group` (needs to exist) |
To improve collaboration this guide is now available on GitHub.