Skip to content

Instantly share code, notes, and snippets.

View tthtlc's full-sized avatar

Peter Teoh tthtlc

View GitHub Profile
@tthtlc
tthtlc / gist:c7e267d7fbf95d3d366146233b28554f
Created March 27, 2018 04:54
parallela's parabuntu image download and run
sudo minicom -s
Welcome to minicom 2.7
OPTIONS: I18n
Compiled on Feb 7 2016, 13:37:27.
Port /dev/ttyUSB0, 11:44:47
Press CTRL-A Z for help on special keys
@tthtlc
tthtlc / gist:d9825431eb13a4337c723411172b73da
Created March 30, 2018 08:02
Oracle database in docker image installation
bash buildDockerImage.sh -v 12.2.0.1 -e
Checking if required packages are present and valid...
linuxx64_12201_database.zip: OK
==========================
DOCKER info:
Containers: 16
Running: 0
Paused: 0
Stopped: 16
@tthtlc
tthtlc / gist:866e2db822e7a636e9a64375a836a13f
Created March 30, 2018 08:06
Oracle database in docker post installation
docker run -it 49712d6a0946
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: anZERbg7P9k=1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 30-MAR-2018 08:03:44
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
@tthtlc
tthtlc / Oracle database in docker - starting up
Created March 30, 2018 08:14
Oracle database in docker - starting up
docker run -it 49712d6a0946
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: anZERbg7P9k=1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 30-MAR-2018 08:03:44
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
@tthtlc
tthtlc / gist:930e4264c602f4b7eea027ab71a5fd77
Created March 30, 2018 08:36
docker stop <oracle_container_id>
2018-03-30T08:17:29.778895+00:00
Errors in file /opt/oracle/diag/rdbms/orclcdb/ORCLCDB/trace/ORCLCDB_ora_2964.trc:
ORA-24962: connect string could not be parsed, error = 303
Stopping container.
SIGTERM received, shutting down database!
SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 30 08:27:11 2018
root@chip:~# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.3.0-ntc (alex@kihei) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #1 SMP Fri Feb 19 09:37:25 PST 2016
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: NextThing C.H.I.P.
[ 0.000000] Memory policy: Data cache writeback
@tthtlc
tthtlc / debug.log
Created April 13, 2018 14:31 — forked from DreamLinuxer/debug.log
GDB script example
Reading symbols from ~/gist/gist-4077328/gdb_test...done.
Breakpoint 1 at 0x4005cf: file gdb_test.c, line 7.
Breakpoint 1, output (val=91652772) at gdb_test.c:7
7 printf("OUTPUT: %X\n",val);
#0 output (val=91652772) at gdb_test.c:7
#1 0x0000000000400632 in rand_output (prev=4294967295, mid=1073741824, mask=2147483647) at gdb_test.c:16
#2 0x000000000040066a in main () at gdb_test.c:23
Breakpoint 1, output (val=4481602) at gdb_test.c:7
@tthtlc
tthtlc / OSCP note A'
Created May 27, 2018 10:44 — forked from c4ri0c4/OSCP note A'
OSCP notes A & B may have some commons
OSCP Handy Commands
Nmap Full Web Vulnerable Scan:
mkdir /usr/share/nmap/scripts/vulscan
cd /usr/share/nmap/scrripts/vulscan
wget http://www.computec.ch/projekte/vulscan/download/nmap_nse_vulscan-2.0.tar.gz && tar xzf nmap_nse_vulscan-2.0.tar.gz
@tthtlc
tthtlc / README.md
Created June 4, 2018 15:56 — forked from joyrexus/README.md
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

import os
import tempfile
import tensorflow as tf
from tensorflow.contrib.layers import fully_connected as fc
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.python.client import timeline
batch_size = 100