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
# originally from: | |
# https://dev.to/wetterkrank/wsl2-localhost-3000-issue-191b#comment-1gg56 | |
$addr='0.0.0.0'; | |
$port=3000; | |
iex "netsh interface portproxy delete v4tov4 listenport=$port listenaddress=$addr"; |
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 | |
# This is a script to both install and run the Stable Diffusion WebUI by AUTOMATIC1111. | |
# Script will first check if the webui is installed, if not it will install it. | |
# Then it will check for updates and run the webui's webui.sh script. | |
# | |
# Usage: | |
# -p [value], --path [value] : | |
# Install Automatic1111's Stable Diffusion Webui repo to a custom path. | |
# You will not need to set this path every time you want to run this script, |
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
# You cannot directly use this file. | |
# Copy below into your ~/.config/alacritty/alacritty.yml file, | |
# under correct location. | |
key_bindings: | |
# Common QoL | |
- { | |
key: Comma, | |
mods: Command, | |
command: |
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
#!/usr/bin/env bash | |
echo "> Running pre-commit script" | |
PWD=$(pwd) | |
BIN_PRETTIER="$PWD/node_modules/prettier/bin-prettier.js" | |
mapfile files < <(git diff-index --diff-filter=d --cached --name-only HEAD) | |
files_c=${#files[@]} |
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
db.MyCollection.aggregate([ | |
{ | |
$group: { | |
_id: "$col", | |
duplicates: { $addToSet: "$_id" }, | |
count: { $sum: 1 }, | |
}, | |
}, | |
{ $match: { count: { $gt: 1 } } }, | |
]) |
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 main | |
import ( | |
"github.com/labstack/echo" | |
"github.com/labstack/echo/middleware" | |
"net/url" | |
"strings" | |
) | |
var ServerPort = ":8000" |
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
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.PBEKeySpec; | |
import java.nio.charset.StandardCharsets; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.KeySpec; | |
import java.util.Base64; | |
public class Salter { | |
public static void main(String[] args) |
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
import java.util.Random; | |
// Java program to demonstrate the usage of | |
// setDaemon() and isDaemon() method. | |
public class DaemonThread extends Thread | |
{ | |
public DaemonThread(String name) { | |
super(name); | |
} |
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
<?php | |
$ans1 = json_decode("{ \"id\": 503732, \"question_id\": 129290, \"title\": \"Hemen hemen her gün yorgunum\", \"link\": null, \"background\": \"\", \"vote_count\": 757, \"created_at\": \"2018-01-30 15:06:05\", \"updated_at\": \"2018-01-30 15:45:24\", \"triggers_lead\": 0, \"cm_question_id\": 129294, \"triggers_display\": 0, \"has_right_answer\": 0, \"is_right_answer\": 0, \"voted\": 0 }"); | |
$ans2 = json_decode("{ \"id\": 503733, \"question_id\": 129290, \"title\": \"Haftada en az 3-4 gün yorgunum\", \"link\": null, \"background\": \"\", \"vote_count\": 262, \"created_at\": \"2018-01-30 15:06:05\", \"updated_at\": \"2018-01-30 15:45:24\", \"triggers_lead\": 0, \"cm_question_id\": 129294, \"triggers_display\": 0, \"has_right_answer\": 0, \"is_right_answer\": 0, \"voted\": 0 }"); | |
$ans3 = json_decode("{ \"id\": 503734, \"question_id\": 129290, \"title\": \"Haftada 1-2 gün yorgunum\", \"link\": null, \"background\": \"\", \"vote_count\": 199, \"created_at\": \"2018-01-30 15:06:05\", \"updated_at\": \"2018-01- |
NewerOlder