Skip to content

Instantly share code, notes, and snippets.

View fliedonion's full-sized avatar

Takahiro KITAHARA fliedonion

View GitHub Profile
@fliedonion
fliedonion / !Find string in PATH env var - summary.md
Last active October 9, 2015 03:34
Find in Path environment variables with babel-node
Summary Find the path from PATH env vars which includes string you specified.
Env win babel-node
@fliedonion
fliedonion / !jQuery $ajax sample - summary.md
Last active October 9, 2015 03:36
jQuery-$ajax-sample
Summary jQuery $ajax sample or snippet
Env jQuery
@fliedonion
fliedonion / !Shebang bat - summary.md
Last active October 9, 2015 10:48
allow you to write script in windows bat file

this is currently experimental

Summary Shabang.bat allow you to embed your script in bat file. Only put #!.bat.
You can write single script file and #!.bat doesn't create any filein your %temp% to run script
Env Windows and ( node.js or python or ... )
@fliedonion
fliedonion / !AngularJS and Foundation login sample - summary.md
Last active October 9, 2015 11:03
AngularJs + Foundation Login form sample
Summary Simple login form using angular.js and Foundation.
Env angular-js Foundation
Note Sample codes written using jsbin
@fliedonion
fliedonion / babel_mocha_immutablejs.html
Last active October 16, 2015 10:19
mocha, babel, Immutable.js
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="bower_components/mocha/mocha.css"/>
<script src="bower_components/mocha/mocha.js"></script>
<script src="node_modules/babel-core/browser.js"></script>
<script src="bower_components/chai/chai.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
@fliedonion
fliedonion / angular-compile.js
Created October 30, 2015 02:56
angular compile usage
var app = angular.module('app',[]);
app.directive('compileBold', function($compile){
return{
restrict: 'E',
link: function(scope, element, attr){
console.log(element.html());
element.html('<b>bold text</b>');
$compile(element.contents())(scope);
}
@fliedonion
fliedonion / Form1.cs
Last active July 21, 2016 14:59
C# Post With Binary Value Sample
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows.Forms;
namespace PostDataWithFlask {
public partial class Form1 : Form {
public Form1() {
@fliedonion
fliedonion / ballAndDialog.js
Last active August 13, 2016 20:17
HTML-CANVAS: use canvas image in dialog sample.
function drawBalls(){
// 描画しているだけ
var BALL = 4, R = 4, W=100, H=100;
var canvas = document.querySelector("#canvas");
var ctx = canvas.getContext("2d");
canvas.addEventListener("contextmenu", function(e){e.preventDefault(); clear();});
ctx.globalCompositeOperation = "source-over";
for(var i = 0; i < BALL; i++){
@fliedonion
fliedonion / FpSpread_InDirectCell.cs
Created December 6, 2016 17:15
FarPoint Spread, "INDIRECTCELL" custom function similar with Excel "INDIRECT".
using System.Windows.Forms;
using FarPoint.CalcEngine;
using FarPoint.Win.Spread.Model;
namespace WindowsFormsApplication1 {
public partial class Form1 : Form {
// this is only behind code.
// put Spread in form designer.
// run and edit A1 cell. values appear in D3, D4 and E3 cells.
@fliedonion
fliedonion / install.md
Last active December 14, 2016 17:28
install bat for gogs with nssm

install gogs with nssm.

summary

usage:
gogs-nssm-installer.bat <your-machine-name> <ip-of-your-machine> <port-for-gogs-web>

ex) gogs-nssm-installer.bat mywin8 192.168.0.10 5050

important notice: If use none secure location, use loopback ip (like 127.0.1.1) for gogs and use gogs behind other web server (nginx, apache etc).