Skip to content

Instantly share code, notes, and snippets.

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

Quyen Nguyen Huu nghuuquyen

🏠
Working from home
View GitHub Profile
@nghuuquyen
nghuuquyen / fix-xcode-select-error-xcodebuild-requires-xcode.md
Created April 13, 2024 17:14 — forked from berkedel/fix-xcode-select-error-xcodebuild-requires-xcode.md
Fix `xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`

Tried to create react app

npx create-react-app app

Unfortunately, got an xcodebuild error

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-darwin-x64.tar.gz
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to:
// - create a webpack.config.js file separately like:
const path = require('path')
const webpack = require('webpack')
module.exports = {
...
resolve: {
extensions: ['.js', '.json', '.vue'],
Sử dụng APOC để làm điều kiện
```
MATCH (user:User)
WHERE ID(user) = 611
MERGE (post:Post {description: 'test', type: 'sketch'})-[:Post {date_upload: timestamp(), visual: 0 }]->(user)
WITH user, post
OPTIONAL MATCH (gen:Genre)<-[:IT]-(gl:GenreLang)
WHERE gl.name IN ['Drammatico', 'Azione']
CALL apoc.do.when(gen IS NOT NULL, 'MERGE (post)-[:HAS_GENRE]->(gen)', '', {post: post, gen: gen}) YIELD value
@nghuuquyen
nghuuquyen / neo4j_cypher_cheatsheet.md
Created July 4, 2018 10:07 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@nghuuquyen
nghuuquyen / Dockerfile
Created June 6, 2018 02:17
Dockerfile Jupyter notebook
FROM jupyter/base-notebook
USER root
# add repository for old php version 7.0
RUN apt-get update && apt-get install -yq --no-install-recommends \
software-properties-common && \
apt-add-repository ppa:ondrej/php
# install dependencies for php 7
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
@nghuuquyen
nghuuquyen / roles_investigation.md
Created January 25, 2018 10:58 — forked from mooniker/roles_investigation.md
Roles and permissions system for Nodejs

ACL / Roles + Permissions

Virgen-ACL (virgen-acl)

  • https://github.com/djvirgen/virgen-acl
  • "Simple in-memory ACL for node.js apps. Supports arbitrary roles and resources, including role/resource detection using a simple interface. Additionally supports custom assertions for more complex rules."
  • Comments: "Simple and elegant, create your own checks. No middleware?"

Node ACL (acl) BuildStatusDependency StatusdevDependency Status

@nghuuquyen
nghuuquyen / SCSS.md
Created January 13, 2018 15:20 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso