Skip to content

Instantly share code, notes, and snippets.

Loading
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 February 28, 2019 13:22
charts without label
<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 February 22, 2019 02:35
A pipeline example
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):
@krizex
krizex / x
Created January 24, 2019 08:20
https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
@krizex
krizex / gdb
Created January 24, 2019 07:05
gdb vmlinux /proc/kcore
[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
#!/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 August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console