Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
愚公移山(The foolish old man removes the mountains)

Junyoung Choi Rokt33r

🐢
愚公移山(The foolish old man removes the mountains)
View GitHub Profile
View config.json
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"node_modules/*",
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@Rokt33r
Rokt33r / readme
Last active Oct 19, 2020
HTML XSS test
View readme
SOURCE: http://htmlpurifier.org/live/smoketests/xssAttacks.php
@Rokt33r
Rokt33r / 3.md
Created Nov 28, 2015
Electron x React x Webpack
View 3.md

Electron x React x Webpack

0. Synopsis

今回は次のような問題を解決してみる。

  1. ES6が使いたい
  2. よりアプリらしく作りたい
  3. 変更するとRefresh押すのが面倒いい
View 2.md

Use NPM

ElectronはNodeとほとんど差がないので、NPMで入れたパッケージも使える。 今回は簡単な画像編集ができるアプリを作ってみる。

1. 設置

npm init
View gist:ea47e184f90b09474f51

A humble start

Electronはどういうものなのかと実際に簡単な例題を作ってみる。

1. Install electron-prebuilt

npm i -g electron-prebuilt
@Rokt33r
Rokt33r / 2015-1.py
Last active Oct 29, 2015
誘導制御課題1
View 2015-1.py
import numpy as np
from math import *
dt = 0.1
a11 = (2 * e ** -dt) - (e ** -(2 * dt))
a12 = (e ** -dt) - (e ** -(2 * dt))
a21 = (-2 * e ** -dt) + (2 * e ** -(2 * dt))
a22 = (-e ** -dt) + (2 * e ** -(2 * dt))
View cors.xml
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://localhost:8000</AllowedOrigin>
<AllowedMethod>HEAD</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
@Rokt33r
Rokt33r / interceptor.js
Created Jun 1, 2015
Angular Http Interceptor
View interceptor.js
angular.module('some-module')
.factory('myHttpInterceptor', ['$q', '$location', function($q, $location) {
return {
response: function(response) {
return response;
},
responseError: function(response) {
if (response.status === 401) {
$location.path('/admin/login');
return $q.reject(response);
@Rokt33r
Rokt33r / router.js
Created Jun 1, 2015
Express Router
View router.js
var express = require('express');
var router = express.Router();
router.get('/', function(req, res) {
res.send('Welcome to the API zone');
});
module.exports = router;
You can’t perform that action at this time.