Skip to content

Instantly share code, notes, and snippets.

@NKjoep
NKjoep / ng1-route-sample.js
Created November 15, 2017 14:18
ng1-route-sample.js
$stateProvider
.state('competition', {url: '/:lang/'+ getLocalizedString('URL.COMPETITION'), ...})
@NKjoep
NKjoep / express.request.mock.ts
Created June 13, 2018 12:39
Mock ExpressJS request object
function emptyRequest() {
return {
_destroy: undefined,
_read: undefined,
accepted: [],
accepts: undefined,
acceptsCharsets: undefined,
acceptsEncodings: undefined,
acceptsLanguages: undefined,
addListener: undefined,
  • Make sure you are aware of the problem/feature.
  • Don't be rude, be polite.
  • Give suggestions and make clear why do you think you suggestion is better than the current approach.
  • Don't point out just the bad things, tell about what do you think is great as well.
  • Make it part of your daily workflow. (use github notifications)
  • http://www.dein.fr/2015-02-18-maslows-pyramid-of-code-review.html

pyramid

@NKjoep
NKjoep / package.json
Last active October 26, 2019 13:33
svg spriter example
{
"name": "spriter",
"version": "0.0.0",
"main": "spriter.js",
"scripts": {
"start": "node spriter.js"
},
"author": "Andrea D. <[email protected]>",
"license": "MIT",
"dependencies": {
const express = require('express');
const cors = require('cors');
const axios = require('axios');
const app = express();
app.use(cors());
app.use(express.json());
console.log( 'running server')
app.get('/api', async (req, res) => {
@NKjoep
NKjoep / run.sh
Created September 13, 2024 07:32
run nginx config via docker
docker run -p 8080:80 -v ./myconfig.conf:/etc/nginx/nginx.conf nginx
@NKjoep
NKjoep / user-style.css
Created March 2, 2025 14:56
Disable Google Photo Website Slide-In Animations
/* ==UserStyle==
@name Google Photos without slide transition
@description Disable the sliding transition between photos and videos in Google Photos
@match https://photos.google.com/*
@version 1.0
@namespace https://greasyfork.org/users/971713
==/UserStyle== */
.TTxCae {
transform: matrix(1, 0, 0, 1, 0, 0) !important;