Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int total = 0;
char buf[256];
#include <string>
#include <iostream>
#include <fstream>
#include <regex>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string names;
@azyu
azyu / gacha_ll.cpp
Last active August 29, 2015 14:17
Gacha - Love Live!
#include <random>
#include <iostream>
#include <unordered_map>
std::discrete_distribution<> dist({
90, // 90%
9, // 9%
1, // 1%
});
@azyu
azyu / private.xml
Last active September 22, 2015 15:32
Karabiner 입력기 단축키
<?xml version="1.0"?>
<root>
<item>
<name>Change input source to ENGLISH by left ctrl + command + E</name>
<identifier>private.change_input_source_to_english</identifier>
<autogen>
__KeyToKey__
KeyCode::E, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L,
KeyCode::VK_CHANGE_INPUTSOURCE_ENGLISH,
KeyCode::VK_WAIT_100MS,
@azyu
azyu / lua_tinker.h
Created June 15, 2014 04:27
lua_tinker call with variadic templates (Visual Studio 2013)
#if _MSC_VER >= 1800
template<typename T, typename ... TArgs>
void push(lua_State *L, T ret, const TArgs& ... args) { push(L, ret); push(L, args...); }
template<typename RVal, typename ... TArgs>
RVal call(lua_State* L, const char* name, const TArgs&... args)
{
lua_pushcclosure(L, on_error, 0);
int errfunc = lua_gettop(L);
@azyu
azyu / .bash_profile
Created February 5, 2014 13:43
~/.bash_profile
case "${OSTYPE}" in
darwin*)
alias ls="ls -G"
alias ll="ls -lG"
alias la="ls -laG"
;;
linux*)
alias ls='ls --color'
alias ll='ls -l --color'
alias la='ls -la --color'