Skip to content

Instantly share code, notes, and snippets.

View ziozzang's full-sized avatar

Jioh L. Jung ziozzang

View GitHub Profile
@lesstif
lesstif / change-ubuntu-mirror.sh
Last active March 20, 2024 07:03
우분투(ubuntu)의 apt 기본 미러(mirror)를 다음 카카오(kakao), 카이스트(kaist), 부경대(harukasan) 으로 변경
#!/usr/bin/env bash
SL=/etc/apt/sources.list
PARAM="r:hm:dnak"
KAKAO=mirror.kakao.com
KAIST=ftp.kaist.ac.kr
HARU=ftp.harukasan.org

LCHF

저탄수화물 고지방 식이요법 - 저탄고지

세줄요약

  1. 탄단지 비율은 1:2:7 (1500kcal 기준, 37g:73g:113g)
  2. 배가 고플때 배부르게 먹는다.
  3. 좋은 지방을 챙겨먹는다.
import sys
def convert_misspel_to_sed(line):
parts = line.split(':')
filename = parts[0]
line_no = parts[1]
keyparts = parts[2].split("->")
misspel = keyparts[0].strip()
valids = [keyword[1:-1] for keyword in keyparts[1].strip().split(',')]
@elico
elico / Dockerfile
Created November 25, 2016 21:22
vyos iso build docker
FROM debian:squeeze
#MAINTAINER Chris Bennett <chris@ceegeebee.com>
MAINTAINER Eliezer Croitoru <eliezer@ngtech.co.il>
ENV DEBIAN_FRONTEND noninteractive
ADD sources.list /etc/apt/sources.list
ENV PATH="/data/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
import contextlib
import functools
class Defer(contextlib.ExitStack):
def __call__(self, *args, **kwargs):
self.callback(functools.partial(*args, **kwargs))
def __del__(self):
self.close()
#!/bin/bash -e
# Setup a Root CA in vault
# Generate and sign an Intermediate cert
#
# Requires:
# * A running vault server already initialzed and unsealed
# * Environment variable VAULT_TOKEN is set
# * vault cli (https://www.vaultproject.io)
# * httpie (https://github.com/jkbrzt/httpie)
@thomasdarimont
thomasdarimont / ConditionalOtpFormAuthenticator.java
Last active November 15, 2023 05:49
Keycloak Conditional OTP Step-by-Step
package org.keycloak.authentication.authenticators.browser;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import javax.ws.rs.core.MultivaluedMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

@smashism
smashism / omnigraffle6_ea.sh
Last active August 22, 2017 06:13
omnigraffle 6 ea
#!/bin/sh
#
# originally by jhbush jamfnation and macadmins slack #jamfnation
# modified by emilyk
# 2015-08-20
#
currentUser=`ls -l /dev/console | awk {' print $3 '}`
if [ -d "/Applications/OmniGraffle.app" ]; then
result=`cat /Users/$currentUser/Library/Containers/com.omnigroup.OmniGraffle6/Data/Library/Application\ Support/Omni\ Group/Software\ Licenses/OmniGraffle*.omnilicense | grep -A 1 Key | grep string | sed 's/<string>//g' | sed 's/<\/string>//g' | awk '{print $1}'`