This file contains hidden or 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
| /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -s | |
| system_profiler SPAirPortDataType |
This file contains hidden or 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
| /set recode_fallback cp1251 | |
| /set recode_out_default_charset cp1251 | |
| /set recode_transliterate off | |
| /set recode_autodetect_utf8 on | |
| /set term_charset utf-8 | |
| /exit |
This file contains hidden or 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
| Включить рацию при нажайтой F, затем в F4 ввести код: | |
| 400-470 МГц - 6029 | |
| 136-174 МГц - 6018 |
This file contains hidden or 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
| ## Generate SSL certificate | |
| #Source http://greengeckodesign.com:8880/blog/2013/06/15/creating-an-ssl-certificate-for-node-dot-js/ | |
| openssl genrsa -des3 -out ca.key 1024 | |
| openssl req -new -key ca.key -out ca.csr | |
| openssl x509 -req -days 365 -in ca.csr -out ca.crt -signkey ca.key | |
| openssl genrsa -des3 -out server.key 1024 | |
| openssl req -new -key server.key -out server.csr | |
| cp server.key server.key.org | |
| openssl rsa -in server.key.org -out server.key |
This file contains hidden or 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
| ----------------------------------------- | |
| -- psqlrc file to set psql preferences -- | |
| -- Author : Prashanth Goriparthi -- | |
| ----------------------------------------- | |
| -- source : https://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/ | |
| \set QUIET ON | |
| \set PROMPT1 '%[%033[1;32;40m%]%M:%> %n@%/%[%033[0m%]% # ' | |
| \set PAGER OFF |
This file contains hidden or 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
| pg_dump -f dbname-2015-12-27.dump --format=d -j 4 -v -x -O --compress=7 dbname | |
| tar -zcvf dbname-2015-12-27.dump.tar dbname-2015-12-27.dump/ | |
| pg_restore -d dbname_test_backup dbname-2015-12-27.dump -v |
This file contains hidden or 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 | |
| BACKUP_DIR=${HOME}'/pgbackup/' | |
| DATE=`date +'%Y-%m-%d_%H-%M'` | |
| for d in `psql postgres -c 'select datname from pg_database' -t`; | |
| do | |
| BACKUP_FILE=${BACKUP_DIR}${d}_${DATE}.dump | |
| pg_dump -f ${BACKUP_FILE} --format=d -j 4 -v -x -O --compress=7 ${d} |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "time" | |
| ) | |
| // Example SSE server in Golang. |
This file contains hidden or 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
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or 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 | |
| pass=`LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | dd bs=100 count=1 2>/dev/null | head -c 16` | |
| echo $pass |
OlderNewer