Skip to content

Instantly share code, notes, and snippets.

View greymd's full-sized avatar
😉
Nanchatte

Yasuhiro Yamada greymd

😉
Nanchatte
View GitHub Profile
@inaz2
inaz2 / japanese-generations-2016.md
Last active August 21, 2021 13:02
日本の世代と2016年時点での年齢
世代 出生年 年齢 時勢
昭和一桁世代 1927年-1934年 82歳-89歳 世界恐慌
焼け跡世代 1935年-1946年 70歳-81歳 第二次世界大戦終戦
全共闘世代 1941年-1949年 67歳-75歳 全共闘運動、安保闘争
団塊の世代 1947年-1949年 67歳-69歳 第一次ベビーブーム
しらけ世代 1950年-1964年 52歳-66歳 第一次オイルショック
新人類 1961年-1970年 46歳-55歳 共通一次試験開始、サブカルチャー隆盛
バブル世代 1965年-1969年 47歳-51歳 ツッパリ文化
団塊ジュニア 1971年-1974年 42歳-45歳 第二次ベビーブーム
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@yukunlin
yukunlin / sudoku_solver.c
Last active January 26, 2020 14:38
Sudoku solver, gcc sudoku_solver.c -O2 -o sudoku_solver && echo '..6.7......9.....35..163...38...27.6.......8.7.....2596..5.71...5.....3.....218..' | ./sudoku_solver
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "sudoku_solver.h"
int fill(sudokuGrid grid, int row, int column, int entry)
{
for (int i = 0; i < DIMENSIONS; i++) {
@egisatoshi
egisatoshi / maclaurin-expansion.md
Last active April 14, 2016 06:23
MacLaurin expansion on shell
% egison -T -e '(maclaurin-expansion (cos x) x)'                                        
1
0
(/ (* -1 x^2) 2)
0
(/ x^4 24)
0
(/ (* -1 x^6) 720)
0
@GeoffWilliams
GeoffWilliams / debuild_ubuntu_debian_package
Created November 5, 2015 10:40
Command to run to build debian packages on ubuntu, fixes bad-distribution-in-changes error, needed for the steps to patch a debian package listed at https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/
# How to run debuild with lintian on ubuntu
# fixes error: bad-distribution-in-changes-file unstable
# Finished running lintian.
debuild -us -uc --lintian-opts --profile debian
@fffaraz
fffaraz / exec.md
Last active March 1, 2021 12:23
execl, execlp, execle, execv, execvp, execvpe
- e p
l execl execle execlp
v execv execve execvp

  • int execl(char const *path, char const *arg0, ...);
  • int execle(char const *path, char const *arg0, ..., char const *envp[]);
@petervanderdoes
petervanderdoes / zfs_health.sh
Last active March 6, 2024 14:04
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@egisatoshi
egisatoshi / Egison_command_tutorial_ja.md
Last active January 1, 2016 07:24
Egisonコマンドラインチュートリアル

Egisonコマンドラインチュートリアル

式を評価

--evalまたは-eオプションで引数の式を評価できます。 式はシングルクォート(`)で囲みます。

$ egison -e '(take 10 primes)'
{2 3 5 7 11 13 17 19 23 29}
@garystafford
garystafford / helpful-docker-commands.sh
Last active October 12, 2023 16:51
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container