Skip to content

Instantly share code, notes, and snippets.

View dotkebi's full-sized avatar

Myoung-jin, Ko dotkebi

View GitHub Profile
@dotkebi
dotkebi / wsl2-network.ps1
Created June 10, 2024 02:10 — forked from composite/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING, IMPROVED FOR TASK SCHEDULER! ALSO WORKS ON WINDOWS SERVER 2022!
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# edited by Ukjin Yang, Jun-7-2022 (Windows Server 2022 also works!)
# Improved features: more detailed logs for Task Scheduler, saved IP check, etc.
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
@dotkebi
dotkebi / wsl2-network.ps1
Created June 10, 2024 02:10 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
//
// CastPlayerViewController.swift
// BasicCastPlayer
//
// Copyright © 2020 Brightcove, Inc. All rights reserved.
//
import UIKit
import GoogleCast
import SnapKit
@dotkebi
dotkebi / setup.config
Created March 23, 2020 14:21 — forked from miguelmota/setup.config
Elastic Beanstalk NGINX rewrite http to https using .ebextensions
files:
"/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf":
mode: "000755"
owner: root
group: root
content: |
server {
listen 80;
gzip on;
@dotkebi
dotkebi / NSData+AES.swift
Last active June 12, 2023 08:59
Swift AES Extensions
import Foundation
extension NSData {
func encryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCEncrypt), key: key, iv: iv)
}
func decryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCDecrypt), key: key, iv: iv)
@dotkebi
dotkebi / ReduxNavigation.js
Created January 31, 2018 20:27 — forked from iesteban/ReduxNavigation.js
Multiple routers with Drawer ReduxNavigation
import React from "react"
import * as ReactNavigation from "react-navigation"
import { connect } from "react-redux"
import AppNavigation from "./AppNavigation"
import { BackHandler } from "react-native"
import PropTypes from "prop-types"
class ReduxNavigation extends React.Component {
static propTypes = {
@dotkebi
dotkebi / ExampleMatacherTest.java
Created June 14, 2017 11:39
ExampleMatacherTest.java
@RunWith(SpringRunner.class)
@SpringBootTest
public class ExampleMatcherTest {
@Autowired
private ExampleRepository repository;
@Test
public void exampleTest() {
Child child = new Child();
@dotkebi
dotkebi / ResponseBodyExampleController3.java
Created May 19, 2017 05:03
ResponseBodyExampleController3
@Controller
public class ResponseBodyExampleController3 {
@ResponseBody
@GetMapping("/")
public String someMethod() {
return "result";
}
}
@dotkebi
dotkebi / ResponseBodyExampleController2.java
Created May 19, 2017 05:02
ResponseBodyExampleController2
@Controller
public class ResponseBodyExampleController2 {
@GetMapping("/")
public
@ResponseBody
String someMethod() {
return "result";
}
@Controller
public class ResponseBodyExampleController1 {
@GetMapping("/")
public @ResponseBody String someMethod() {
return "result";
}
}