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
$ c++ -Wall -Wextra -Werror hello_multithreading_world.cc -o hello_multithreading_world | |
$ ./hello_multithreading_world | |
Hello Multithreading World |
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 <iostream> | |
#include <string> | |
#include <system_error> | |
#include <thread> | |
class BackgroundTask { | |
public: | |
void operator()() const { | |
std::cout << "Hello Multithreading World" << std::endl; | |
} |
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
$ cc -Wall -Wextra -Werror hello_multithreading_world.c -o hello_multithreading_world | |
$ ./hello_multithreading_world | |
Hello Multithreading World |
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 <pthread.h> | |
#include <stdio.h> | |
void *helloWorld(void *arg) { | |
(void)(arg); | |
printf("Hello Multithreading World\n"); | |
return (void *)0; | |
} | |
int main() { |
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 <pthread.h> | |
int pthread_create(pthread_t *id, | |
const pthread_attr_t *attr, | |
void *(*start_routine)(void *), | |
void *arg); |
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
# Based on: norm.zsh-theme | |
NEWLINE=$'\n' | |
PROMPT='%{$fg[yellow]%} %n@%m %D{%R.%S %a %b %d %Y} %{$fg[green]%}%c $(git_prompt_info)$(hg_prompt_info)%{$reset_color%}%{$fg[yellow]%}${NEWLINE}⌘ ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}git %{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} %{$reset_color%}" | |
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg[blue]%}hg %{$fg[red]%}" | |
ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} %{$reset_color%}" |
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
#!/usr/bin/env /bin/sh | |
# Yet another repo launcher that call the latest launcher | |
if test -f "`pwd`/.repo/repo/repo"; then | |
`pwd`/.repo/repo/repo $* | |
else | |
if [ ! -f "${HOME}/.local/bin" ]; then | |
mkdir -p "${HOME}/.local/bin" | |
fi | |
if [ ! -f "${HOME}/.local/bin/google-repo" ]; then |
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
#compdef aosp | |
# Basic completion | |
complete -W "cd customize-sbox build env log reload tree unset xcode" aosp | |
# # Advanced completion from _aosp | |
# compdef _aosp aosp | |
# autoload -U compinit | |
# compinit |
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
# -*- coding: UTF-8 -*- | |
# This example is contributed by Hoàng Văn Khoa | |
# Example modified for Atom | |
# Based on https://github.com/gnunn1/tilix/blob/master/data/nautilus/open-tilix.py | |
# Installation: | |
# mkdir -p ~/.local/share/nautilus-python/extensions | |
# cp open-atom.py ~/.local/share/nautilus-python/extensions | |
from gettext import gettext, textdomain | |
from subprocess import PIPE, call |
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
--- | |
Language: Cpp | |
# BasedOnStyle: LLVM | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlinesLeft: false | |
AlignOperands: true | |
AlignTrailingComments: true |