Skip to content

Instantly share code, notes, and snippets.

View wonsuc's full-sized avatar

Jason Yoo (Wonsuc Yoo) wonsuc

  • pwdr
  • Seoul, South Korea
View GitHub Profile
@mjgartendev
mjgartendev / nuxt.config.js
Created May 25, 2018 04:36
An example nuxt.config.js file heavily commented from the nuxt and vue-meta documentation examples
module.exports = {
/*
Headers of the page
- Nuxt.js uses vue-meta to update the headers and html attributes of your application.
- Nuxt.js configures vue-meta with these options:
{
keyName: 'head', // the component option name that vue-meta looks for meta info on.
attribute: 'data-n-head', // the attribute name vue-meta adds to the tags it observes
ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag
@NiPfi
NiPfi / FirestoreRepository.java
Created April 18, 2018 07:36
Basic implementation of a repository pattern for Firebase Firestore
package ch.jojoni.jamplan.model.repository;
import android.support.annotation.NonNull;
import android.util.Log;
import com.google.android.gms.tasks.Continuation;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.DocumentReference;
@shirakaba
shirakaba / setup.md
Last active March 26, 2024 13:28
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

@int128
int128 / RequestAndResponseLoggingFilter.java
Last active January 13, 2024 10:46
Spring Web filter for logging request and response
/*
Copyright 2017 Hidetake Iwata
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
#if UNITY_EDITOR
using System.Reflection;
using UnityEngine;
using UnityEditor;
public class FontSwitcher : EditorWindow
{
[MenuItem("Font/Show Window")]
public static void ShowFontWindow()
{
@JoeRoddy
JoeRoddy / FirebaseToFirestore.js
Created October 18, 2017 16:19
Convert Firebase Database JSON to Firestore Collections
var db = firebase.firestore();
var content = require("./sourceData.json");
content &&
Object.keys(content).forEach(contentKey => {
const nestedContent = content[contentKey];
if (typeof nestedContent === "object") {
Object.keys(nestedContent).forEach(docTitle => {
firebase
.firestore()
@jthegedus
jthegedus / CF4F-express|functionsES6|index-03.js
Last active March 4, 2019 06:32
Cloud Functions for Firebase - Express example 3/3 - using CORS and automatically appending a trailing slash
const functions = require("firebase-functions")
const cors = require("cors")
const express = require("express")
/* Express with CORS & automatic trailing '/' solution */
const app3 = express()
app3.use(cors({ origin: true }))
app3.get("*", (request, response) => {
response.send(
"Hello from Express on Firebase with CORS! No trailing '/' required!"
@Atrix1987
Atrix1987 / firebase_function_feed.js
Created April 23, 2017 09:19
Firebase Function snippet for populating a user feed
exports.updateFeed = functions.database.ref('/stories/{userId}/{storyId}').onWrite(event => {
const userId = event.params.userId;
const storyId = event.params.storyId;
let followersRef = admin.database().ref('/followers/'+userId);
if(!event.data.val()){
//post was deleted
followersRef.once("value", function(snap) {
snap.forEach(function(childSnapshot) {
let followerId = childSnapshot.key;
@somecuitears
somecuitears / Gradle SpringMVC.md
Last active January 27, 2020 16:05
Spring MVC from Gradle in IntelliJ

Creating Gradle Project

  1. Create New Project

  2. Select Java and Web from the Option

  3. You will be asked to provide GroupID and ArtifactID

  • GroupID: it will identify your project uniquely across all projects. (E.g. com.project.model | com.project.plugins)
@unicodeveloper
unicodeveloper / systemjs.config.js
Last active November 20, 2023 05:41
SystemJS config file
/**
* System configuration
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things