Skip to content

Instantly share code, notes, and snippets.

View IJEMIN's full-sized avatar

I_Jemin IJEMIN

View GitHub Profile
@IJEMIN
IJEMIN / Filter.py
Created November 8, 2015 12:39
Pure Python Box Blur Source.
# Box Blur Algorithm from Gerdus van Zyl <gerdusvanzyl@gmail.com>
# it's a slow.it's not good to realtime stuff. Still it works without any other python library based on C.
# Need pypng(pure tiny python image library) for extractiing pixel array of png file.
# Portable. Just put png.py from pypng to your project with this file.
# This source gonna save your file with name "FINAL.PNG" Reccomend modifying for your project.
import png
import array
@IJEMIN
IJEMIN / Animal.cs
Last active February 7, 2017 11:27
유니티 C# 스크립트, 클래스와 오브젝트 교육
// 이 튜토리얼 코드는, Derek Benas 의 C# 교육 코드를 유니티 스크립트 교육 맞춰 간단하게 고친것임을 밝힌다.
class Animal
{
// public : 접근 제한이 없다
// protected : 현재 클래스와 자식 클래스에서만 접근 가능
// private : 현재 클래스에서만 접근 가능
// 클래스 내부의 변수를 필드라고 부른다.
class Player: MonoBehaviour{
///// 코드 뭉치들..
public float checkRadius; // 체크할 반경
void Update() {
// 중심으로 부터 원을 그려서 겹치는 모든 콜라이더2D 들을 배열로 가져옴
Collider2D detectedColliders = Physics2D.OverlapCircle(transform.position, checkRadius);
//하나씩 순회하면서 만약에 타입 A를 가진 친구가 있다면 실행하고 나머지 코드는 무시
foreach (Collider2D target in detectedColliders)
//Add Symbol "USING_GOOGLE_MOBILE_ADS" to Build Setting after import GoogleMobileAds library from here https://github.com/googleads/googleads-mobile-unity
#if USING_GOOGLE_MOBILE_ADS
using UnityEngine;
//using System.Collections;
using GoogleMobileAds.Api;
public class AdmobBannerLoader : MonoBehaviour {
public string adUnitId;
@IJEMIN
IJEMIN / ImageLoader.cs
Created January 20, 2018 12:32
Load sprite from local file path, and load sprite in UI Image.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
// 로컬 이미지 파일 경로를 주면 해당 경로에서 이미지를 로드해 UI Image로 띄어주는 코드
public class ImageLoader : MonoBehaviour {
// 스프라이트를 로드할 이미지 컴포넌트
@IJEMIN
IJEMIN / TermalRed.shader
Created January 20, 2018 18:58
Thermal Effect on Unity Shader
Shader "Custom/TermalRed" {
Properties {
_NormalTex("Normal Texture",2D) = "white" {}
_DistanceFadeOut("DistanceFadeOut",Range(0,3)) = 0
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
@IJEMIN
IJEMIN / inviteAll.js
Created February 25, 2018 12:04
슬랙 특정 채널에 모든 사람들을 추가
var foundAny=false;
function selectAllByLetter(remainingLetters) {
console.log(remainingLetters)
var letter = remainingLetters.pop();
$("#channel_invite_filter").val(letter).trigger("input");
setTimeout(function() {
$(".channel_invite_member:not(hidden)").each(function(i, obj) {
foundAny=true;
this.click();
});
@IJEMIN
IJEMIN / SpriteMerger.cs
Created September 22, 2018 11:26
Sprite Merger in Unity
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
// Merge multiple Sprites as one sprite
public static class SpriteMerger {
public static Sprite MergeSprite(Sprite[] sprites) {
// 스프라이트 중 가장 큰 크기의 것으로 지정되야함
@IJEMIN
IJEMIN / auto_car.ino
Created December 27, 2018 07:11
Arduino Car code for friend homework :P
#include <SoftwareSerial.h>
#include <AFMotor.h>
AF_DCMotor motor_L(4); // 모터드라이버 L293D 3: M3에 연결, 4: M4에 연결
AF_DCMotor motor_R(3);
// ????
int i;
int j;
//초음파센서 출력핀(trig)과 입력핀(echo), 변수, 함수 선언//
@IJEMIN
IJEMIN / DownloadReports.py
Created January 1, 2019 11:37
Download Google Play Console Sales Report from google cloud storage
from google.cloud import storage
import os
certificationJsonFile = 'XXXXX.json'
bucketName = r'pubsite_prod_rev_XXXXXX'
reportYear = 2018
# Connecte with Service Account
storage_client = storage.Client.from_service_account_json(certificationJsonFile)