Skip to content

Instantly share code, notes, and snippets.

View Loliver1224's full-sized avatar
🌸
今日も一日がんばるぞい!

FURUKAWA Daichi Loliver1224

🌸
今日も一日がんばるぞい!
View GitHub Profile
# ==================== Emojis ====================
# 🎉 :tada: Initial commit
# 🎨 :art: デザイン
# 🐛 :bug: バグ修正
# ♻️ :recycle: リファクタリング
# 💄 :lipstick: コード整形
# ✏️ :pencil2: typo
# 📚 :books: ドキュメント
# 🔖 :bookmark: ブクマ
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct{
int id;
char name[20];
} dict;
int intcmp(const void *a, const void *b){
@Loliver1224
Loliver1224 / helloworld.c
Last active June 30, 2019 04:35
C言語でも1行でHello worldできるんやで
main(){puts("Hello, world!");}
@Loliver1224
Loliver1224 / check_envp.c
Last active June 30, 2019 04:34
実はC言語のmain関数には第3の引数が存在するというわけで
#include <stdio.h>
int main(int argc, char *argv[], char *envp[]){
/* check argc */
printf("argc = %d\n", argc);
/* check argv */
printf("argv = [");
for(int i=0; i<argc; i++)
printf("\'%s\' ", argv[i]);
alias l='exa -alhF --git'
alias p='bat'
alias 2='cd ~/2nd'
alias 3='cd ~/3rd'
alias 4='cd ~/4th'
alias web='cd ~/public_html/webexer/CSS'
alias oop='cd ~/4th/oop'
alias os='cd ~/4th/os'
alias net='cd ~/4th/net'
@Loliver1224
Loliver1224 / Julialang.sty
Last active November 5, 2020 06:27
Julia-lang style definition for LaTeX Listings.
%% Julia definition (c) 2020 Daichi Furukawa
%%
\lstdefinelanguage{Julia}{%
morekeywords={abstract, ans, baremodule, begin, break, const, continue, do,%
elseif, else, end, export, finally, for, function, global, if, import,%
let, local, macro, module, mutable, primitive, quote, return, struct, try,%
type, using, var, where, while},%
% Types
morekeywords=[2]{Any, Array, Bool, BigInt, BigFloat, Char, DataType, Enum,%
Expr, Float16, Float32, Float64, Function, Inf, Inf16, Inf32, Int8, Int16,%
@Loliver1224
Loliver1224 / MyPrint.java
Created March 11, 2021 14:11
Javaにおけるprintlnの簡潔化
public class MyPrint {
public static void main(String[] args) {
println("Hello, world!");
}
void print(Object line) {
System.out.print(line);
}
void println(Object line) {
System.out.println(line);
@Loliver1224
Loliver1224 / pkl2jld.jl
Created March 19, 2021 12:11
pickle to jld converter
using PyCall, JLD
py"""
import pickle
with open("filename.pkl", 'rb') as f:
data = pickle.load(f)
"""
data = py"data"
save("file.jld", data)
@Loliver1224
Loliver1224 / fileEncryption.sh
Created March 22, 2021 07:10
openssl コマンドによるファイル暗号化
# 暗号化(-pass未指定だと標準入力,-aでBase64形式に,-iterで暗号化回数の指定を推奨(総当り攻撃対策))
openssl aes-256-cbc -e -in [filename] -out [filename] -a -iter [int: iteration] [-pass pass:password | env:環境変数 | file:filename]
# 復号
openssl aes-256-cbc -d -in [filename] -out [filename] -a -iter [int: iteration] [-pass pass:password | env:環境変数 | file:filename]
@Loliver1224
Loliver1224 / install.sh
Created March 23, 2021 09:01
Rust製CLIのfishシェル上でのインストール
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install Rust
set -U fish_user_paths $fish_user_paths $HOME/.cargo/bin # set Rust path
# install cargo packages
cargo install exa bat hexyl fd-find procs ripgrep