Skip to content

Instantly share code, notes, and snippets.

View Bloofer's full-sized avatar

Joonmo Yang Bloofer

View GitHub Profile
@Bloofer
Bloofer / disqus.js
Created July 21, 2021 12:04
disqus
document.write(' \
<style type="text/css" media="screen">\
.dsq-widget ul.dsq-widget-list {\
padding: 0;\
margin: 0;\
text-align: left;\
}\
img.dsq-widget-avatar {\
width: 32px;\
height: 32px;\
@Bloofer
Bloofer / recent_comments.html
Created July 21, 2021 11:58
recent_comments
<div class="recent-comment">
<h2>최근댓글</h2>
<ul>
<s_rctrp_rep>
<script type="text/javascript" src="https://bloofer-blog.disqus.com/recent_comments_widget.js?num_items=5&hide_mods=0&hide_avatars=0&avatar_size=32&excerpt_length=100">
</script>
</s_rctrp_rep>
</ul>
</div>
@Bloofer
Bloofer / redirection.html
Created July 20, 2021 11:33
redirection
<!--리디렉션 코드 시작-->
<script type="text/javascript">
var url1 = 'algolstudy.tistory.com';
var url2 = 'bloofer.net';
var online = document.URL;
if(online.match(url1)) document.location.href = online.replace(url1, url2);
</script>
<!--리디렉션 코드 끝-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Clean Blog - Start Bootstrap Theme</title>
<link rel="icon" type="image/x-icon" href="static/assets/favicon.ico" />
<!-- Font Awesome icons (free version)-->
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run()
#include <stdio.h>
void main(int argc, char **argv)
{
char buf[100];
snprintf(buf, sizeof buf, argv[1]);
}
@Bloofer
Bloofer / formatstring.c
Created May 28, 2021 13:44
formatstring
#include <stdio.h>
void main(int argc, char **argv)
{
// This line is safe
printf("%s\n", argv[1]);
// This line is vulnerable
printf(argv[1]);
}
@Bloofer
Bloofer / shark2.cpp
Created April 23, 2021 15:51
shark2
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef struct{
int x, y, dir;
bool dead;
} FISH;
int arr[4][4]; // 물고기: 1~16, 상어: -1, 빈칸: 0
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N, M, K;
int A[10][10];
int land[10][10]; // 땅의 양분 정보
typedef struct{
int year;
@Bloofer
Bloofer / freight.cpp
Created April 18, 2021 02:25
freight
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
int N, M;
bool visit[10001] = {0, };
int strt, dest, sol = 0;
vector< pair<int, int> > brdVec[10001]; // 섬에서 연결된 <다른 섬, 제한 무게> 벡터