Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yang Qian krizex

🏠
Working from home
View GitHub Profile
View notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krizex
krizex / example.html
Created Feb 28, 2019
charts without label
View example.html
<body>
<canvas id="myChart" width="200" height="200"></canvas>
</body>
<script>
var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [{
@krizex
krizex / pipeline_example.py
Last active Feb 22, 2019
A pipeline example
View pipeline_example.py
from threading import Thread
from Queue import Queue
from time import sleep
q1 = Queue()
q2 = Queue()
# task generater
def producer1():
for i in range(10):
View x
https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
View gdb
gdb vmlinux /proc/kcore
View myservice
[Unit]
Description=My Miscellaneous Service
After=network.target
[Service]
Type=simple
# Another Type option: forking
User=nanodano
WorkingDirectory=/home/nanodano
ExecStart=/home/nanodano/my_daemon --option=123
View enable
#!/bin/bash
### Filename: coredumpshell.sh
### Description: enable coredump and format the name of core file on centos system
# enable coredump whith unlimited file-size for all users
echo -e "\n# enable coredump whith unlimited file-size for all users\n* soft core unlimited" >> /etc/security/limits.conf
mkdir -p /var/coredumps
chmod 777 /var/coredumps
@krizex
krizex / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console