This file contains hidden or 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
| // Zed settings | |
| // | |
| // For information on how to configure Zed, see the Zed | |
| // documentation: https://zed.dev/docs/configuring-zed | |
| // | |
| // To see all of Zed's default settings without changing your | |
| // custom settings, run `zed: open default settings` from the | |
| // command palette (cmd-shift-p / ctrl-shift-p) | |
| { | |
| "title_bar": { |
This file contains hidden or 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
| alias intel="arch -x86_64" | |
| # kubectl shortcuts to use fzf to search resources | |
| alias kctx='kubectl config use-context $(kubectl config get-contexts | fzf | tr -s " " | cut -d " " -f 2)' | |
| klogs() { | |
| if [ -n "$1" ]; then | |
| kubectl logs -n "$1" -f $(kubectl get pods -n "$1" | fzf | tr -s " " | cut -d " " -f 1) | |
| else | |
| selection=$(kubectl get pods --all-namespaces | fzf | tr -s " ") | |
| [ -z "$selection" ] && return |
This file contains hidden or 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
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| source ~/.fzf.zsh | |
| source ~/.alias.zsh |
This file contains hidden or 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
| { | |
| "key": "customConditional", | |
| "type": "hidden", | |
| "input": false, | |
| "clearOnHide": false, | |
| "calculateValue": { | |
| "==": [ | |
| { "==": [{ "var": "component.conditional.show" }, "true"] }, | |
| { "==": [{ "var": "data[component.conditional.when].value" }, { "var": "component.conditional.eq" }] }, | |
| ] |
This file contains hidden or 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 Microsoft.AspNetCore.Mvc; | |
| using System.Linq; | |
| using System.Security.Claims; | |
| using System.Threading.Tasks; | |
| namespace TwoDrive.Api | |
| { | |
| public static class ExtractUserExtension | |
| { | |
| protected static string GetLoggedUserId(this ControllerBase ctrl) |
This file contains hidden or 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 | |
| .AddAuthentication(JwtBearerDefaults.AuthenticationScheme) | |
| .AddJwtBearer(options => | |
| { | |
| options.Authority = "https://securetoken.google.com/firebase-project"; | |
| options.TokenValidationParameters = new TokenValidationParameters | |
| { | |
| ValidateIssuer = true, | |
| ValidIssuer = "https://securetoken.google.com/firebase-project", | |
| ValidateAudience = true, |
This file contains hidden or 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 Microsoft.Extensions.Configuration; | |
| using Microsoft.IdentityModel.Tokens; | |
| using System; | |
| using System.IdentityModel.Tokens.Jwt; | |
| using System.Security.Claims; | |
| using System.Text; | |
| namespace TwoDrive.Core | |
| { | |
| public class TokenService |
This file contains hidden or 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
| #include<stdio.h> | |
| int max(int a, int b) { | |
| return a > b ? a : b; | |
| } | |
| int max_profit(int* values, size_t len) { | |
| if (len == 1) return 0; | |
| int ret = 0; |
This file contains hidden or 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
| module RectangleFinder where | |
| import Prelude hiding ((*)) | |
| import qualified Data.Map as Map | |
| type Point = (Int, Int) | |
| countRects :: [Point] -> Int | |
| countRects pts = fst $ foldl processPoints (0, Map.empty) $ filter isAbove $ pts * pts |
This file contains hidden or 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.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using FindMe; | |
| namespace TestProj | |
| { | |
| class Program | |
| { |
NewerOlder