Skip to content

Instantly share code, notes, and snippets.

View SnowyPainter's full-sized avatar
🎯
Focusing

Minwoo Yu SnowyPainter

🎯
Focusing
View GitHub Profile
@SnowyPainter
SnowyPainter / setgopath.sh
Created September 13, 2020 17:33
Set gopath
export GOPATH=Address ex) $HOME/MyProject
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
@SnowyPainter
SnowyPainter / LICENSE
Created September 20, 2020 17:39
저작물 라이선스 탬플릿 License template for a Github organization
본 github.com의 repositorie 속, 프로젝트 제안서 등과 같은 모든 문서, 사진 등은 ‘ORGANIZATION_NAME’ github organization의 소유 창작물입니다.
위 저작물 등은 아래와 같은 CCL을 따릅니다.
CC BY NC ND
저작물을 사용할땐, 저작권자(이하 ORGANIZATION_NAME)를 표시해야하며,
그 목적은 비영리여야 합니다. 또한 저작물의 내용을 변경 할 수 없습니다.
하지만 출처와 저작권자를 명시 한다면 사용 할 수 있습니다.
public static class Path {
private bool isValidPath(string path)
{
if (path.Length < 3 ||
!new Regex(@"^[a-zA-Z]:\\$").IsMatch(path.Substring(0, 3)) ||
!DriveInfo.GetDrives().Select(drive => drive.Name).Contains(path.Substring(0, 3)) ||
new Regex("[" + Regex.Escape(new string(Path.GetInvalidPathChars()) + @":/?*" + "\"") + "]").IsMatch(path.Substring(3, path.Length - 3)) ||
path[path.Length - 1] == '.')
return false;
@SnowyPainter
SnowyPainter / ListsExtension.cs
Created November 4, 2020 13:31
In short, all of the List<inheritances> of INTERFACE can be called, It actually works just like Stack.Pop
public static class ListsExtension
{
public static T Pop<T>(this List<T> clist, int index) where T : INTERFACE
{
var c = clist[index];
cargos.RemoveAt(index);
return c;
}
}
@SnowyPainter
SnowyPainter / set.txt
Last active November 14, 2020 14:28
Android Studio Setting up for Ubuntu
source ~/.bash_profile
grep kvm /etc/group
chown $USER /dev/kvm
flutter pub get
@SnowyPainter
SnowyPainter / start_flameshot.sh
Created January 1, 2021 12:08
Open flameshot
flameshot gui
@SnowyPainter
SnowyPainter / PlayerController.cs
Created January 2, 2021 08:02
This will perfectly work with your FPS player
using UnityEngine;
public class PlayerController : MonoBehaviour
{
const float walkSpeed = 5.0f, runSpeed=8.0f;
float yRot, xRot;
float rotationSpeed = 7f;
float speed;
[SerializeField]
Camera cam;
import 'dart:io';
import 'dart:convert';
Future main() async {
var server = await HttpServer.bind(
InternetAddress.loopbackIPv4,
3000,
);
print('Listening on localhost:${server.port}');
App.Current.Properties.Add("key", value);
await App.Current.SavePropertiesAsync();
using System;
using System.Reflection;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace HeVibrates
{
[ContentProperty (nameof(Source))]
class ImageResourceExtension:IMarkupExtension
{