Skip to content

Instantly share code, notes, and snippets.

View nabeen's full-sized avatar
🤔
Who am I ?

Kenichiro Watanabe nabeen

🤔
Who am I ?
View GitHub Profile
@nabeen
nabeen / add-two-numbers.ipynb
Created May 11, 2020 15:25
add-two-numbers.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nabeen
nabeen / two-sum.ipynb
Last active May 8, 2020 13:28
two-sum.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nabeen
nabeen / index.php
Created November 13, 2019 17:00
toDataURL with Cross Origin image
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<canvas id="canvas"></canvas>
#include <stdio.h>
int calc(int a, int b)
{
return a + b;
}
int main(void)
{
int a = 1;
@nabeen
nabeen / docker-compose.yml
Last active April 17, 2024 08:35
swagger-editor / swagger-ui docker-compose
swagger-editor:
image: swaggerapi/swagger-editor
container_name: "swagger-editor-container"
ports:
- "8081:8080"
swagger-ui:
image: swaggerapi/swagger-ui
container_name: "swagger-ui-container"
ports:
- "8082:8080"
@nabeen
nabeen / wercker.yml
Created April 6, 2018 14:23
gatsby build and deploy to firebase
box: node
build:
steps:
- script:
name: npm build
code: |
npm install -g gatsby
yarn install
gatsby build
deploy:
@nabeen
nabeen / reference_call.php
Created April 4, 2018 09:01
use reference call in PHP
<?php
$data = range(1, 10);
print_r($data);
x2val($data);
print_r($data);
function x2val(&$data) {
foreach ($data as &$val) {
$val = $val * 2;
@nabeen
nabeen / .eslintrc
Created February 7, 2018 17:30
.eslintrc sample for react native
{
"extends": "eslint-config-rallycoding",
"rules": {
"no-underscore-dangle": 0
}
}
@nabeen
nabeen / .editorconfig
Last active February 5, 2018 02:06
.editorconfig file
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 2
request = service.files().get_media(fileId=foo)
dirname = bar
name = baz
os.makedirs(dirname, 0o777, True)
fh = io.FileIO(os.path.join(dirname, name), mode='wb')
downloader = MediaIoBaseDownload(fh, request)
done = False
while done is False:
status, done = downloader.next_chunk()
print("Download %d%%." % int(status.progress() * 100))