Skip to content

Instantly share code, notes, and snippets.

@peanutsando
peanutsando / mysql.md
Created July 21, 2017 04:07 — forked from honux77/mysql.md
AWS ec2에 mysql 설치하기

MySQL Install

AWS 우분투 인스턴스 만들기

  • AWS로 ubuntu 16.04 시작
  • user-data를 넣어 보자
#!/bin/bash
mkdir /home/ubuntu/script/
cat <<'EOF' >> /home/ubuntu/script/slack.sh
#!/bin/bash
@peanutsando
peanutsando / recover_source_code.md
Created July 23, 2017 14:09 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@peanutsando
peanutsando / media-query.css
Created August 14, 2018 07:40 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@peanutsando
peanutsando / script.md
Created August 15, 2018 18:08
nuxt pm2 start

Just another way of doing it ;-)

install pm2 in global

npm i -g pm2

start command

pm2 start npm --name "your-app-alias" -- start
@peanutsando
peanutsando / script.md
Created September 9, 2018 17:41
npm error script
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
@peanutsando
peanutsando / basic.css
Created September 11, 2018 08:42
css basic
@import url('https://fonts.googleapis.com/css?family=Noto+Sans+KR');
html, body { height:100%; font-family: 'Noto Sans KR', sans-serif; -webkit-text-size-adjust:none; font-size:12px; }
body, input, select, button, textarea, h1, h2, h3, h4, h5, h6, table { line-height:1.5; font:inherit; color:inherit; }
html, body, div, form, input, select, button, textarea, legend, fieldset, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, blockquote, address, p, th, td, caption { margin:0; padding:0; }
ol, ul, li { list-style:none; }
img, fieldset { vertical-align:middle; border:0 none; }
input, select, textarea { vertical-align:middle; resize:none; }
input[type=text], input[type=password], input[type=submit], input[type=search], input[type=email], input[type=tel], textarea { -webkit-appearance:none; }
button { border:0 none; background:transparent; cursor:pointer; }
@peanutsando
peanutsando / script.sh
Last active December 6, 2018 18:04
ubuntu default setup
# 1. nvm
apt-get install build-essential libssl-dev
# use curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# or Wget
# wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
source ~/.bashrc
{
"profile": {
"id": 1,
"name": "Karthik",
"picture": "https://image.ibb.co/k0wVTm/profile_pic.jpg",
"status": "Available",
"friends": [
{
"id": 2,
"name": "Alex",
[
{
"id": 2,
"user": {
"name": "Alex",
"imageUrl": "https://image.ibb.co/cA2oOb/alex_1.jpg",
},
"lastTimestamp": "10:00 AM",
"lastMessage": "Or maybe not, let me check logistics and call you. Give me sometime"
},