Skip to content

Instantly share code, notes, and snippets.

wenxingxing

Block or report user

Report or block wenxingxing

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View inline_asm.cpp
int foo(char* x, char*, int a, int b) { return a + b; }
typedef int (*func)(int, int);
int main() {
int a = 10, b = 20, c = 0;
void* p = (void*)foo;
__asm__ __volatile__(
"movl %%edx,%%esi; "
@wenxingxing
wenxingxing / TurnipPrices.cpp
Created Apr 24, 2020 — forked from Treeki/TurnipPrices.cpp
AC:NH turnip price calculator
View TurnipPrices.cpp
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
View install rime
$ sudo pacman -S ibus ibus-rime
$ sudo pacman -S ttf-dejavu adobe-source-han-sans-otc-fonts
$ cat .xinitrc
...
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS="@im=ibus"
...
$ sudo reboot
View .tmux.conf
set -g default-terminal screen-256color
set-option -g mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
View ipython-notebook-multiple-kernels-venv.md

IPython Notebook with multiple kernels and virtualenv

Explanations of how to install and use IPython Notebook with a venv and multiple virtualenv (one for Python 2 and one for Python 3).

Step-by-step installation

We run step-by-step and detail all the operations. A quicker, more concise guide can be found at the end of this gist.

Create virtualenv

We create first one venv for each version of Python.

mkvirtualenv -p /path/to/python2.7 venv-name
deactivate
You can’t perform that action at this time.