Skip to content

Instantly share code, notes, and snippets.

View hyrious's full-sized avatar
💤
lazy

hyrious hyrious

💤
lazy
View GitHub Profile
@hyrious
hyrious / index.html
Created August 28, 2017 12:39
Free Calculator! Offline!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
table
td {
margin: 2px; border: 2px solid transparent; padding: 8px;
background: lightgrey;
@hyrious
hyrious / Makefile
Created September 3, 2017 13:57 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@hyrious
hyrious / lid.rb
Created September 23, 2017 01:47
linear probability draw card
def draw b, c, d, q = rand
pc = 2.0 / ((d + 1) * (c - b + 1))
s = pb = d * pc
dp = (d - 1) * pc / (c - b)
while s < q
s += pb -= dp
b += 1
end
b
end
@hyrious
hyrious / 2017-01-06-mks-exam.markdown
Created September 23, 2017 01:50
《马克思主义基本原理概论》复习纲要

鬼知道我为什么要做这种东西​:sob:​

目录

  1. 什么是马克思主义;马克思主义产生的历史条件和阶级基础;马克思主义直接的理论来源;马克思主义科学性与革命性的统一及其基础。
  2. 哲学是系统化、理论化的世界观哲学是世界观与方法论的统一;哲学与具体科学的关系;思维和存在的关系问题是哲学基本问题;哲学的基本派别及其历史形态。
  3. 马克思主义的物质观:物质的定义;运动是物质的存在方式和根本属性;时空是物质的存在形式。马克思主义的意识观意识的起源、本质和能动作用世界的物质统一性原理及其意义
  4. 实践的本质、特征和基本形式;社会生活在本质上是实践的
  5. 联系的客观性、普遍性和多样性;发展的实质。
  6. 对立统一规律是唯物辩证法的实质和核心矛盾的两个基本属性矛盾是事物发展的动力矛盾的普遍性与特殊性辩证关系原理及其意义对立统一规律与社会主义和谐社会的构建
title category
RGSS Snippets
code

Main Loop

def mainloop
 loop { Input.update; yield; Graphics.update }
@hyrious
hyrious / YetAnotherGithub.css
Last active December 26, 2017 13:33
preview markdown the fast script
html{margin:40px 20px}body{box-sizing:border-box;width:980px;margin:0 auto;padding:45px;word-wrap:break-word;background-color:#fff;border:1px solid #ddd;border-radius:3px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Segoe UI",Arial,"PingFang SC", "Microsoft YaHei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5}body pre code,body code,body pre{font-size:85%;line-height:1.45;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,"PingFang SC", "Microsoft YaHei",monospace}body::before{display:table;content:""}body::after{display:table;clear:both;content:""}body>*:first-child{margin-top:0 !important}body>*:last-child{margin-bottom:0 !important}body a:not([href]){color:inherit;text-decoration:none}body .absent{color:#cb2431}body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}body .anchor:focus{outline:none}body p,body blockquote,body ul,body ol,body dl,body table,body pre{margin-top:0;margin-bottom:16px}bod
@hyrious
hyrious / nosleep.c
Last active March 18, 2018 12:49
prevent sleep
#include <windows.h>
#include <stdio.h>
int running;
BOOL WINAPI consoleHandler(DWORD signal) {
if (signal == CTRL_C_EVENT) {
running = FALSE;
return TRUE;
}
@hyrious
hyrious / dknap.c
Created June 7, 2018 07:27
算法作业
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAXN 128
int max(int a, int b) {
return a > b ? a : b;
}
void DKnap(int p[], int w[], int n, int M) {
@hyrious
hyrious / index.html
Created July 2, 2018 07:44
winword.css.html
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<title>WinWord.css</title>
<style>*{box-sizing:border-box}::selection{background-color:rgba(0,0,0,.1)}body{background-color:#f2f2f2;user-select:none}article{max-width:768px;margin:0 auto;padding:50px 72px 54px;user-select:text;background:#fff;border:1px solid #ddd}pre{white-space:pre-wrap;padding:1em;border:1px solid}h1,h2,h3,h4,p{font-weight:400}h1{text-align:center;color:#000}h1,h2,h3,h4{margin:12px 0 0;font-family:sans-serif}p{margin:0 0 12px;font-family:serif;text-indent:2em;color:#333}h2,h3{color:#222}h4,h5,h6{color:#444}</style>
<body>
<article>
<h1>Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid obcaecati nemo aliquam maiores iure facilis vero eveniet, voluptate magni delectus animi eos, eligendi doloremque adipisci. Soluta commodi consequuntur ipsa autem?</p>
<ol>
@hyrious
hyrious / hello-world.js
Created August 25, 2018 00:56
Koa Snippets
app.use(async ctx => {
ctx.body = 'hello world!'
})