There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
events { | |
worker_connections 1024; | |
} | |
http { | |
# google's DNS server | |
resolver 8.8.8.8; | |
resolver_timeout 5s; | |
server { | |
# proxy server port |
1) Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query |
import poplib | |
import email | |
from base64 import b64decode | |
pop3_server = 'pop.gmail.com' | |
pop3_port = '995' | |
username = '[email protected]' | |
password = 'XXXXXXXXXXXXXX' | |
M = poplib.POP3_SSL(pop3_server, pop3_port) |
#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |
-- a quick LUA access script for nginx to check IP addresses against an | |
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
-- | |
-- allows for a common blacklist to be shared between a bunch of nginx | |
-- web servers using a remote redis instance. lookups are cached for a | |
-- configurable period of time. | |
-- | |
-- block an ip: | |
-- redis-cli SADD ip_blacklist 10.1.1.1 | |
-- remove an ip: |
There are some key values that the time.Parse
is looking for.
By changing:
test, err := time.Parse("10/15/1983", "10/15/1983")
to
/* | |
This function will help you to convert your object from struct to map[string]interface{} based on your JSON tag in your structs. | |
Example how to use posted in sample_test.go file. | |
*/ | |
func structToMap(item interface{}) map[string]interface{} { | |
res := map[string]interface{}{} | |
if item == nil { | |
return res | |
} |
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"errors" | |
"io" | |
"io/ioutil" |
select s.sql_text,s.sql_fulltext from v$sql s | |
where sql_id in (SELECT A.SQL_ID FROM V$SESSION A,V$PROCESS B | |
WHERE A.PADDR=B.ADDR AND B.SPID='6495') |
;Disable and Enable Synaptics touchpad using Keyboard Shortcut on Windows 10 | |
;CTRL+F9 to enable the Synaptics Touchpad | |
^F9:: | |
Run C:\Windows\System32\control.exe main.cpl ;Open Mouse Properties | |
Sleep 1000 ;Wait one second | |
if WinExist("Mouse Properties") { | |
WinActivate ;Make Mouse Properties the active Window | |
Send, ^+{TAB} ;Go to last tab | |
Send, !E ;Alt+E to enable touchpad |