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 ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"time" | |
) | |
// Custom type to wrap sql.NullTime |
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
git remote add {name} https://[email protected]/org/repo_name/_git/repo_name | |
git fetch {name} | |
git subtree add --prefix=my_folder-name {name} master |
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
<div class="flex h-screen flex-col items-center justify-center bg-[#141516] relative z-10"> | |
<button class="text-white border-2 relative text=[#F3F3F3] font-grot py-2 px-3 rounded-lg flex justify-center cursor-pointer bg-origin-border bg-clip-padding bg-[length:200%] before:content-[''] before:h-[30%] before:w-[60%] before:absolute before:bottom-[-20%] before:bg-[length:200%] bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,#FF6D1B,#FFEE55,#5BFF89,#4D8AFF,#6B5FFF,#FF64F9,#FF6565)] before:bg-[linear-gradient(90deg,#FF6D1B,#FFEE55,#5BFF89,#4D8AFF,#6B5FFF,#FF64F9,#FF6565)] before:blur-lg animate-razor before:animate-razor hover:animate-razor2 hover:before:animate-razor2 border-transparent before:-z-10" style="background-clip: padding-box, border-box, border-box;"> | |
Get Started | |
</button> | |
</div> |
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
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- ./wordpress.sql:/docker-entrypoint-initdb.d/init.sql # prepopulate database | |
- db_data:/var/lib/mysql # persist database data inside docker storage | |
restart: always | |
env_file: | |
- .env | |
environment: |
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
for (int i = 0; i < 100; i++) { | |
var x = RandomPicker<string>.GetRandomChoice("A", 70, "B", 30); | |
Console.WriteLine(x); | |
} | |
public class RandomPicker<T> { | |
private static Random _random = new Random(); | |
public static T GetRandomChoice(T valueA, int weightA, T valueB, int weightB) { | |
int totalWeight = weightA + weightB; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<style> | |
body { | |
margin: 0px; | |
font-family: Roboto, Tahoma; |
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
{ | |
"main": "dist/index.js", | |
"scripts": { | |
"build": "npx tsc && node dist/index.js" | |
}, | |
"devDependencies": { | |
"typescript": "^4.9.5" | |
} | |
} |
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 myCoolFetch(url: string): Promise<Response> { | |
// Simulating an asynchronous operation | |
return new Promise<Response>((resolve, reject) => { | |
// Simulating a delay before resolving the promise | |
setTimeout(() => { | |
// Create a mock response object | |
const response: Response = { | |
status: 200, | |
statusText: "OK", | |
ok: true, |
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
git add . | |
git commit --date='2020-10-09 00:00:00' -m "initial commit" | |
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' | |
git push -f |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace PassPropertyTests | |
{ | |
public class BaseObject | |
{ | |
public string Name { get; set; } | |
public string Email { get; set; } |
NewerOlder