Skip to content

Instantly share code, notes, and snippets.

View acro5piano's full-sized avatar
🏠
Working from home

Kay Gosho acro5piano

🏠
Working from home
View GitHub Profile
@volosincu
volosincu / arch-linux-uefi-install.md
Last active December 5, 2024 06:03
Arch linux UEFI installation guide

Arch Linux UEFI installation guide

1) Partitioning

a) create partitions using a tool like gdisk, cfdisk .... (more about partitioning )

b) after partifioning we must build the filesystems on the devices (format partitions) using mkfs

   
 mkfs.vfat -F 32 /dev/sdX1 // format efi-boot partition as FAT 32 
@langpavel
langpavel / GraphQLTimestamp.js
Last active July 28, 2023 08:46
GraphQLTimestamp.js
import { Kind } from 'graphql/language';
import { GraphQLScalarType } from 'graphql';
function serializeDate(value) {
if (value instanceof Date) {
return value.getTime();
} else if (typeof value === 'number') {
return Math.trunc(value);
} else if (typeof value === 'string') {
return Date.parse(value);
@jaysoo
jaysoo / webpack.config.js
Last active November 6, 2023 03:31
Minimum webpack config for development
// 1. npm init
// 2. npm install --save webpack webpack-dev-server babel-loader babel-preset-es2015
// 3. mkdir dist && touch index.html
// 4. Include `<script src="/bundle.js"></script>` inside index.html
// 5. mkdir src && touch src/index.js
// 6. Add some code to index.js (e.g. `console.log('Hello, World!'))
// 7. npm start
// 8. Browse to http://localhost:8080/dist/
const webpack = require('webpack')
@carlessanagustin
carlessanagustin / ansible-path.md
Last active December 3, 2019 19:11
updating PATH with ansible - system wide

Option 1

- name: compile sources
  shell:
    coffee -o lib -c src 
    chdir=${mysourcedir}
  environment:
    PATH: $PATH:/opt/node/bin
@starkcoffee
starkcoffee / gist:42f71f97b80a535ae282
Created February 23, 2016 10:40
Creating a google calendar template
So you can propose an event and people can add it to their calendars.
For the record, here's where I generated the link: http://kalinka.tardate.com/
And here's where I've found the recurring parameter which I added to the generated link: http://stackoverflow.com/questions/22757908/google-calendar-render-action-template-parameter-documentation#comment56381005_23495015
Thanks Alon!
@srph
srph / oauth.js
Created February 21, 2016 13:50
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
@aftercider
aftercider / sequelize-relation.js
Created January 3, 2016 07:55
NodeJSのORMライブラリSequelizeで、relationを設定して、JOINしたデータを取得する
"use strict";
// 使用するSQLite3のDBは以下
// https://drive.google.com/file/d/0BzCcFSX0gJGkNFQya2ZIZ0xQelE/view?usp=sharing
/**
* Sequelizeの導入
*/
var Sequelize = require("sequelize");
@maximilian-lindsey
maximilian-lindsey / express_in_electron.md
Last active November 3, 2024 21:30
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
@Doooooo0o
Doooooo0o / haproxy.cfg
Created November 27, 2015 14:53
haproxy config for docker registry v2
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
ssl-server-verify none