Skip to content

Instantly share code, notes, and snippets.

View image72's full-sized avatar

image72 image72

View GitHub Profile
@ismailyenigul
ismailyenigul / nextcloud-traefik2-multi-network-deployment.yml
Last active September 15, 2021 07:55
nextcloud-traefik2-multi-network-deployment
## Trafik Multi Network Deployment
1. Create Traefik network
` # docker network create --driver=bridge --attachable --internal=false traefik `
2. Edit `traefik2/docker-compose.yml`
- Change ACME email
- Change --providers.docker.network=traefik value if you created different network then `traefik`
@tkrotoff
tkrotoff / CSSFrameworks.md
Last active April 12, 2025 09:59
CSS Frameworks (Bootstrap, Tailwind CSS, Bulma, React Bootstrap, Chakra UI, Ant Design)

The right question is: is there added value in reinventing the wheel? (button, form controls, badge, card, spinner, modal...). The existing wheels will probably ride better than yours.

I would go with vanilla Bootstrap (just the Sass part, not the JS part).

Bootstrap

Bootstrap CSS utilities are very nice: same principles as Tailwind CSS.

@aerobounce
aerobounce / macOS System Preference Pane Links.md
Last active October 22, 2025 10:59
macOS System Preference Pane Links
@shisama
shisama / proxy_server.js
Last active July 29, 2024 18:25
Node.js Proxy Server with Basic Auth Sample
const http = require("http");
const { parse } = require("basic-auth");
const { PROXY_USERNAME, PROXY_PASSWORD } = process.env;
const PROXY_PORT = process.env.PROXY_PORT || 8000;
const check = (credentials) => {
return (
credentials &&
credentials.username === PROXY_USERNAME &&
credentials.pass === PROXY_PASSWORD
@ephys
ephys / useLocalStorage.ts
Last active February 15, 2022 02:21
React-hook like useState but synchronized with localStorage & sessionStorage (and the others)
/**
* Source: https://gist.github.com/Ephys/79974c286e92665dcaae9c8f5344afaf
*/
import { useState, useEffect, useCallback, useRef } from 'react';
const eventTargets = new WeakMap();
function getEventTarget(storage: Storage) {
if (eventTargets.has(storage)) {
@nvbn
nvbn / App.js
Last active August 29, 2023 13:39
Hooks with classes
import React from "react";
import Counter from "./Counter";
const App = () => {
return (
<div className="App">
<Counter initialCount={100} />
</div>
);
};
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active December 25, 2025 06:25
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
#!/usr/bin/env node
const PPT = require('puppeteer');
const PDD = require('puppeteer/DeviceDescriptors');
const PuppeteerHar = require('puppeteer-har');
(async () => {
const ua = await PPT.launch({
headless: true,
args: ['--no-sandbox', '--disable-gpu'],
@v1shwa
v1shwa / dynamic_subdomains
Created March 21, 2019 13:54
Dynamically map subdomains to different ports on the server - using Nginx
server {
listen 80;
# maps p8080.example.com -> localhost:8080
server_name ~^p(?<port>[^.]+)\.example\.com$;
location / {
proxy_pass http://localhost:$port;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 13, 2024 04:15
What's the longest keyword sequence in Javascript?