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
export PS1='$(if [[ ! "$?" = "0" ]]; then echo "\[\e[1;31m\]($?)\[\e[0m\] "; fi)\h:\[\e[1;31m\]$(basename $PWD)\[\e[0m\]\[\e[1;33m\]$(__git_ps1 " [%s]")\[\e[0m\]> ' |
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
Get-AppxPackage -AllUsers | Remove-AppxPackage |
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 DEBUG_H | |
#define DEBUG_H | |
#include <bits/stdc++.h> | |
#define yo cout << "YO[" << __FILE__ << ":" << __LINE__ << "]" << std::endl;std::cerr.flush();std::cout.flush();exit(0) | |
#define check(x) std::cerr.flush();std::cout.flush();std::assert(x) | |
template<typename Arg, typename... Args> | |
void print_debug(const char * filename, int line, Arg&& arg, Args&&... args) { |
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
apt install flex bison | |
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1 | |
cd WSL2-Linux-Kernel/tools/perf | |
make -j8 | |
sudo cp perf /usr/local/bin |
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 <GLFW/glfw3.h> | |
int main(void) | |
{ | |
GLFWwindow* window; | |
/* Initialize the library */ | |
if (!glfwInit()) | |
return -1; |
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
[Docker Swarm] | |
title=Docker Swarm | |
description=Docker Swarm | |
ports=2377/udp|7946/tcp|7946/udp|4789/udp |
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
[GlusterFS Daemon] | |
title=GlusterFS (Daemon) | |
description=GlusterFS Daemon | |
ports=24007/tcp | |
[GlusterFS Management] | |
title=GlusterFS (Management) | |
description=GlusterFS Management | |
ports=24008/tcp |
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 <math.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <omp.h> | |
#define N 1000000 | |
// Compare 3/2 power calculation |
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 <vector> | |
#include <chrono> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
int n = 1000000; | |
int value = 42; | |
vector<int> vec(n, value); |
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
function slug() { | |
echo "$1" | sed "s/\s/-/g" | tr "[:upper:]" "[:lower:]" | |
} | |
slug "Hello World!" |