Skip to content

Instantly share code, notes, and snippets.

View Rokt33r's full-sized avatar
🧨
BOOM!

Junyoung Choi Rokt33r

🧨
BOOM!
View GitHub Profile
@Rokt33r
Rokt33r / main.py
Last active August 29, 2015 14:03
simple text editor
from tkinter import *
from tkinter.filedialog import *
master = Tk()
tf = Text(master, bg="white", bd=0)
tf.pack(fill=BOTH, expand=1)
def hello():
print(tf.get("1.0", END))
print("END")
@Rokt33r
Rokt33r / e2e.md
Created November 1, 2014 08:42
End to End Test with Headless browser

End to End Test with Headless browser

AngularJSなどのFrontendまで関わっている環境をテストするためには実際にユーザが使うBrowseまで用いる必要がある。 こう言う全体を考えたテストをEnd to End Test (以下E2E)と呼ぶ。

今回はE2Eテストをするとき、Headless browserを用いてみる

Headless browserとは、ホームページを画面に表示ずにコードのままで起動するBrowserである。

Headless Browserを使う時に得られる長所

  1. レンダリングをする必要がないので速い。
@Rokt33r
Rokt33r / 1.md
Created December 27, 2014 09:56
Angular 1st - Project init

Project init

BowerとNPMの初期設定をする。

global package

install

npm install -g bower grunt-cli karma-cli
@Rokt33r
Rokt33r / FunctionalHelper.php
Last active August 29, 2015 14:14
CodeceptionでのMockを使ったFacadeのテスト / Using Mock to test Facade with Codeception for Laravel ref: http://qiita.com/fluke8259/items/98e6b2d82f214fc91230
<?php namespace Codeception\Module;
class FunctionalHelper extends \Codeception\Module
{
public function getApp(){
return $app = $this->getModule('Laravel4')->kernel;
}
public function readyMailerMock(){
$mock = \Mockery::mock('Mailer');
$this->getApp()['mailer'] = $mock;
@Rokt33r
Rokt33r / .md
Created April 28, 2015 07:35
AWS Ubuntu setup for Laravel

AWS Ubuntu Setup

Overview

  • php5.6(php-fpm) for Laravel
  • nginx

1. Install Packages

sudo apt-get update && sudo apt-get install python-software-properties
@Rokt33r
Rokt33r / .md
Last active August 29, 2015 14:20
REST Test helper for Laravel5

Test Helper

Simple test helper trait for testing Laravel5 REST API app.

Using packages

  • Laracasts/TestDummy for Intergration test with DB
  • Flow/JSONPath for validating JSON

How to use

Install the packages

@Rokt33r
Rokt33r / file0.php
Created May 7, 2015 07:39
Laravel Test: `call` method wrapper for Angular $http ref: http://qiita.com/fluke8259/items/224dac74f62c921c9efd
<?php
use Illuminate\Http\Request;
class TestCase extends Illuminate\Foundation\Testing\TestCase {
use TestHelpersTrait;
/**
* Creates the application.
*
@Rokt33r
Rokt33r / Transaction.md
Last active August 29, 2015 14:21
Transaction
@Rokt33r
Rokt33r / index.html
Last active August 29, 2015 14:21
JWT-AUTH Example html
<!doctype html>
<html ng-app="jwt-auth">
<head>
<meta charset="UTF-8">
<title>JWT-AUTH</title>
</head>
<body>
<div ng-controller="AppController as vm">
<button ng-click="vm.getResource()">Get protected resource</button>
<div ng-if="!vm.isLoaded">
@Rokt33r
Rokt33r / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console