Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { serve } from 'https://deno.land/std@0.154.0/http/server.ts'; | |
const PORT = 8088; | |
const ALLOWED_HEADERS = ['x-api-key', 'anthropic-version', 'Content-Type']; | |
function addCORSHeaders(responseHeaders: Headers) { | |
responseHeaders.set('Access-Control-Allow-Origin', '*'); // Allow requests from any origin | |
responseHeaders.set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS'); // Allowed methods | |
responseHeaders.set('Access-Control-Allow-Headers', '*'); // Allow all headers | |
} |
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
async function anthropicReproducable(content: string): Promise<string> { | |
try { | |
let apiKey = 'Add API key' | |
const data = { | |
model: 'claude-3-sonnet-20240229', | |
system: "You are helpful assistant and your name it Le'Claude. Always add your name in response", | |
messages: [ | |
{ | |
role: 'user', | |
content: content, |
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
defmodule Expng do | |
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks] | |
def png_parse(<< | |
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, | |
_length :: size(32), | |
"IHDR", | |
width :: size(32), | |
height :: size(32), |
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 | |
# Define variables | |
DOMAIN=foo.example.com | |
# renew cert | |
certbot renew | |
# combine latest letsencrypt files for mongo |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
call plug#begin() | |
" Autocompletion | |
Plug 'roxma/nvim-completion-manager' | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --racer-completer --omnisharp-completer --tern-completer' } | |
Plug 'ervandew/supertab' | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
" Buffer |
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
### A Pluto.jl notebook ### | |
# v0.12.18 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 72d474ec-4327-11eb-26d0-072a3be1e84f | |
begin | |
using Pkg | |
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 name="viewport" content="width=device-width" /> | |
<title>⚡ Pluto.jl ⚡</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.17/frontend/editor.css" type="text/css" /> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.17/frontend/treeview.css" type="text/css" /> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.17/frontend/hide-ui.css" type="text/css" /> |
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
defmodule ROP do | |
defmacro try_catch(args, func) do | |
quote do | |
(fn -> | |
try do | |
unquote(args) |> unquote(func) | |
rescue | |
e -> {:error, e} | |
end |
NewerOlder