show dbs
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. create a network with docker network create NETWORKNAME | |
2. Create letsencrypt directory for acme.json ie /docker/letsencrypt directory or somewhere else mkdir -p /docker/letsencrypt | |
3. I configured http -> https redirect | |
# cat docker-compose.yml | |
version: '3.3' | |
services: | |
traefik2: | |
image: traefik |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gamesnake; | |
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import java.util.*; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* MIT License | |
* | |
* Copyright (c) 2022 Albert Chang | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$.ajaxSetup({ | |
error: function(jqXHR, exception) { | |
if (jqXHR.status === 0) { | |
alert('Not connect.\n Verify Network.'); | |
} else if (jqXHR.status == 404) { | |
alert('Requested page not found. [404]'); | |
} else if (jqXHR.status == 500) { | |
alert('Internal Server Error [500].'); | |
} else if (exception === 'parsererror') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure we're working on the latest version of the main branch | |
git switch main | |
git fetch | |
git pull | |
# Create a new branch | |
git switch -c vitest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lambda function | |
---- | |
exports.handler = async (event) => { | |
console.log(event) | |
const customerId = event.pathParameters.customerId; | |
const customer = {'customerId': customerId, 'customerName': "Customer " + customerId }; | |
const response = { | |
statusCode: 200, | |
// Uncomment below to enable CORS requests | |
headers: { |
So your dashboard is slow? We are doing our best but maybe it's time to think if the issue isn't on your side.
Some of our dashboards looks like https://www.theworldsworstwebsiteever.com/. Are you sure you really need to see all the time all the data? Or do you really need to see data for last week or month all the time? How often do you use filtering by some of those variables in your dashboard?
Let's not end up as your mother saying:
But.. but.. I might need this in future so let's leave this icon on the Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.IO; | |
using UnityEngine.UI; | |
public class ScreenshotNow : MonoBehaviour | |
{ | |
public RectTransform rectT; // Assign the UI element which you wanna capture | |
public Image img; | |
int width; // width of the object to capture | |
int height; // height of the object to capture |
NewerOlder