Skip to content

Instantly share code, notes, and snippets.

View iwatakeshi's full-sized avatar
📚
Always learning

Takeshi iwatakeshi

📚
Always learning
View GitHub Profile
@iwatakeshi
iwatakeshi / nuxt.config.js
Created August 19, 2019 15:37 — forked from mkmms/nuxt.config.js
@nuxt/apollo Cors Issue Apollo config
apollo: {
clientConfigs: {
default: {
httpEndpoint: `${process.env.API_URL}/graphql`,
httpLinkOptions: {
fetchOptions: {
mode: 'cors' //Cors Needed for external Cross origins, need to allow headers from server
},
credentials: "omit" //must be omit to support application/json content type
}
@iwatakeshi
iwatakeshi / A Nuxt.js VPS production deployment.md
Created August 14, 2019 02:34 — forked from DreaMinder/A Nuxt.js VPS production deployment.md
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with [email protected]. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

<div class="typeform-widget" data-url="https://takeshiiwana.typeform.com/to/bjEeWX" style="width: 100%; height: 500px;"></div> <script> (function() { var qs,js,q,s,d=document, gi=d.getElementById, ce=d.createElement, gt=d.getElementsByTagName, id="typef_orm", b="https://embed.typeform.com/"; if(!gi.call(d,id)) { js=ce.call(d,"script"); js.id=id; js.src=b+"embed.js"; q=gt.call(d,"script")[0]; q.parentNode.insertBefore(js,q) } })() </script> <div style="font-family: Sans-Serif;font-size: 12px;color: #999;opacity: 0.5; padding-top: 5px;"> powered by <a href="https://admin.typeform.com/signup?utm_campaign=bjEeWX&utm_source=typeform.com-14436369-Basic&utm_medium=typeform&utm_content=typeform-embedded-poweredbytypeform&utm_term=EN" style="color: #999" target="_blank">Typeform</a> </div>
@iwatakeshi
iwatakeshi / Contract Killer 3.md
Created July 11, 2019 21:12
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@iwatakeshi
iwatakeshi / pipelines.yml
Last active April 23, 2019 13:38 — forked from nicobytes/pipelines.yml
Install chrome for CI
image: node:6.9.4
pipelines:
branches:
master:
- step:
script:
- apt-get update; apt-get install -y gettext-base;
- echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
{"contents":{"launch":{"version":"0.2.0","configurations":[{"name":"Extension","type":"extensionHost","request":"launch","runtimeExecutable":"${execPath}","args":["--extensionDevelopmentPath=${workspaceFolder}"]}]}},"overrides":[],"keys":["launch.version","launch.configurations"]}
@iwatakeshi
iwatakeshi / quicksort.hpp
Created April 12, 2019 18:56
Quicksort in C++
#include <vector>
template<class T>
void quick_sort(std::vector<T>& list);
template<class T>
void quick_sort(std::vector<T>& list, int start, int end);
template<class T>
int partition(std::vector<T>& list, int start, int end, int pivot);
@iwatakeshi
iwatakeshi / words.md
Created March 18, 2019 17:43
How to install the American dict in Ubuntu

Install American Dict. in Ubuntu

sudo apt install wamerican
@iwatakeshi
iwatakeshi / .clang-format
Created March 6, 2019 19:00
Preferred C++ formatting style
BasedOnStyle: Webkit
AccessModifierOffset: 0
# AfterNamespace: true
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Attach
ColumnLimit: 0
CompactNamespaces: true
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
IndentCaseLabels: false
@iwatakeshi
iwatakeshi / icon_paths.md
Created March 2, 2019 16:53
Icon paths for Ubuntu 10

Snap

cd /var/lib/snap/dekstop/applications/

Non-Snap

Local

~/.local/share/desktop/