##Cheat Sheet
- detailyang's Cheat Sheet
- shadowbq's Cheat Sheet
- DZone
- Our Favorite Cheat Sheets
- quick reference sheets in one page
##Interview
ip link set enp5s0 down ; ip link set enp5s0 name eth0 ; ip link set eth0 up |
for i in {1..9}; do awk -F',' '{printf "%s,%s,%s,%s,%s\n", $1, $2, $3, $5,$6}' dc_topo_new350${i}.csv > dc_topo_cap_${i}.csv; sleep 1; done | tee 1 | |
for i in {0..9}; do awk -F',' -v i="${i}" '{printf "%s,%d,%d,%s,%s\n", $1 + i * 40000, $2 + i * 10000, $3 + i * 10000, $5,$6}' dc_topo_new351${i}.csv > haha_${i}; done |
#include <iostream> | |
#include <set> | |
#include <vector> | |
#include <deque> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
double Pow(double x, double y) { |
#include <stdio.h> | |
#include <vector> | |
#include <cuda_runtime.h> | |
using namespace std; | |
__device__ void lock(int *mutex) { | |
while (atomicCAS(mutex, 0, 1) != 0); | |
} | |
__device__ void unlock(int *mutex) { |
#!/bin/bash | |
XM_SDK_PATH="/opt/xm-sdk" | |
cd ~ | |
rm -rf $XM_SDK_PATH | |
cd ~/src | |
#make distro-run | |
/usr/bin/expect <<EOF |
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
fib_a := 0 | |
fib_b := 1 | |
return func() int { |
//./core/include/xmconf.h:323:struct xmc | |
//This structure contains every important part of the XtratuM. | |
struct xmc { | |
#define XMC_SIGNATURE 0x24584d43 // $XMC | |
xm_u32_t signature; | |
xm_u8_t digest[XM_DIGEST_BYTES]; | |
xmSize_t dataSize; | |
xmSize_t size; | |
// Reserved(8).VERSION(8).SUBVERSION(8).REVISION(8) |