Skip to content

Instantly share code, notes, and snippets.

View hackjutsu's full-sized avatar

CosmoX hackjutsu

View GitHub Profile
# installation: pip3 install wordcloud
wordcloud_cli --text mytext.txt --imagefile wordcloud.png
@hackjutsu
hackjutsu / release-node.md
Last active June 19, 2021 04:50
[Lepton V2EX] 记录 #v2ex 上关于 #lepton 的帖子

介绍

Lepton 是基于 Gist 的代码片段管理工具( Snippet Manager ),支持 Mac/Windows/Linux。(开源免费)

更新

  • 新增 snippet 雷达图,了解技能增长方向 (如下截图)
  • 新增自动更新功能,无需手动下载
@hackjutsu
hackjutsu / test.graphql
Created May 31, 2021 21:02
[GraphQL test]
query {
resolution {
....
#define section-info
section {
name
uniqueName
href
parameters {
key
@hackjutsu
hackjutsu / Lepton-shortcuts.md
Last active November 20, 2020 14:43
[Lepton shortcuts] The shortcut list for #lepton
Function Shortcut Note
New Snippet Cmd/Ctrl + N Create a snippet
Edit Snippet Cmd/Ctrl + E Edit a snippet
Submit Cmd/Ctrl + S Submit the changes from the editor
Cancel Cmd/Ctrl + ESC Exit the editor without saving
Immersive Mode Cmd/Ctrl + I Toggle the Immersive mode
Dashboard Cmd/Ctrl + D Toggle the dashboard
About Page Cmd/Ctrl + , Toggle the About page
Search Shift + Space Toggle the search bar
@hackjutsu
hackjutsu / sklearn.ipynb
Last active November 20, 2020 14:43 — forked from schwehr/sklearn.ipynb
[Jupyter Notebook Demo 3] This is a #demo for Lepton's support of Jupyter Notebook viewer.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hackjutsu
hackjutsu / Nature.ipynb
Last active October 28, 2020 11:22 — forked from zonca/Nature.ipynb
[Jupyter Notebook Demo 2] This is a #demo for Lepton's support of Jupyter Notebook viewer.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hackjutsu
hackjutsu / retryer.java
Created June 20, 2020 01:33
[Guava Retryer] Snippet for retrying by Guava Retryer https://github.com/rholder/guava-retrying
Callable<Boolean> callable = new Callable<Boolean>() {
public Boolean call() throws Exception {
return true; // do something useful here
}
};
Retryer<Boolean> retryer = RetryerBuilder.<Boolean>newBuilder()
.retryIfResult(Predicates.<Boolean>isNull())
.retryIfExceptionOfType(IOException.class)
.retryIfRuntimeException()
@hackjutsu
hackjutsu / TmpDirExample.java
Last active June 7, 2020 00:37
Use java.io.tmpdir to get system tmp directory.
import java.io.File;
import java.io.IOException;
public class TmpDirExample {
public static void main(String[] args) {
String tmpdir = System.getProperty("java.io.tmpdir");
System.out.println("The default value of the java.io.tmpdir system property is: \""
+ tmpdir + "\"\n");
@hackjutsu
hackjutsu / test.bat
Created June 6, 2020 19:57
[test scirpt for batch]
@ECHO OFF
for /l %%a IN (4,-1,0) do (
echo.%%a: First command in block
echo. Second command in block
)
echo.
if exist "c:\windows" (
echo.The c:\windows directory exist.
set "IsWin=YES"
@hackjutsu
hackjutsu / .zshrc
Created June 6, 2020 19:24
[my zsh configurations] #zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/cosmoqiu/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes