This file contains 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 | |
# http://www.nongnu.org/avr-libc/user-manual/install_tools.html | |
# For optimum compile time this should generally be set to the number of CPU cores your machine has | |
JOBCOUNT=$(getconf _NPROCESSORS_ONLN) | |
# Build for Linux | |
# A Linux AVR-GCC toolchain is required to build a Windows toolchain | |
# If the Linux toolchain has already been built then you can set this to 0 |
This file contains 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
Prerequisites | |
============= | |
- One Pinephone braveheart edition | |
- A micro SIM card or Nano sim with micro adapter | |
- A micro SD card (tested with SanDisk Ultra microSDXC UHS-1 64G) | |
- A 5V power adapter with regular usb connector (15 Watts recommended. 5V/3 amp) | |
- A Linux desktop/laptop to prepare the SD card (laptop used in this tutorial) | |
Preparation |
This file contains 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
#include <boost/asio/coroutine.hpp> | |
#include <boost/asio/local/connect_pair.hpp> | |
#include <boost/asio/local/stream_protocol.hpp> | |
#include <iostream> | |
#include <sys/wait.h> | |
std::size_t | |
send_fd(boost::asio::local::stream_protocol::socket& socket, | |
int fd, | |
boost::system::error_code& ec) |
This file contains 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
#include <sstream> | |
#include <iostream> | |
#include <iomanip> | |
std::string uint8_to_hex_string(const uint8_t *v, const size_t s) { | |
std::stringstream ss; | |
ss << std::hex << std::setfill('0'); | |
for (int i = 0; i < s; i++) { |
This file contains 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
#include<bits/stdc++.h> | |
#include<iostream> | |
using namespace std; | |
//Create Global variable for cache size(total number of cache lines) | |
int cacheSize; | |
//Create Global data structures for cache and TLB lookup on heap | |
//Cache -> Queue |
This file contains 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
#ifndef NODE_HPP | |
#include <vector> | |
#include <stack> | |
#include <functional> | |
#include <list> | |
#include <iterator> | |
#include <type_traits> | |
/** A class representing an arbitrary tree **/ | |
template<typename T> |
This file contains 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
# Installing Maya 2015 SP6 on Linux Mint 18.1 Serena with Student License | |
# This should work with later versions of Maya or different versions of Ubuntu [based] operating systems with a few changes. | |
# Don't run this as a script, instead copy and paste each line into your terminal | |
# Download link is from here: https://knowledge.autodesk.com/support/maya/downloads/caas/downloads/content/autodesk-maya-2015-service-pack-6.html | |
mkdir ~/maya2015_setup | |
cd ~/maya2015_setup |
This file contains 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 | |
gst-launch-1.0 -v udpsrc uri=udp://239.1.1.1:5000 caps="application/x-rtp,channels=(int)2,format=(string)S16LE,media=(string)audio,payload=(int)96,clock-rate=(int)44100,encoding-name=(string)L24" ! rtpL24depay ! audioconvert ! autoaudiosink sync=false |
This file contains 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
// ============================================================================ | |
// This code is in the Public Domain - I claim no copyrights over it. | |
// Use at your own leisure and risk. | |
// | |
// Compiled and tested with: | |
// c++ -std=c++11 -fno-exceptions -Wall -Wextra -pedantic -O3 linear_allocator.cpp | |
// ============================================================================ | |
#include <cassert> | |
#include <cstdint> |
This file contains 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 | |
# scp-speed-test.sh | |
# Author: Alec Jacobson alecjacobsonATgmailDOTcom | |
# http://www.alecjacobson.com/weblog/?p=635 | |
# | |
# Test ssh connection speed by uploading and then downloading a 10000kB test | |
# file (optionally user-specified size) | |
# | |
# Usage: | |
# ./scp-speed-test.sh user@hostname [test file size in kBs] |
NewerOlder