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
Copyright (c) <year> <holder name> | |
Permission is hereby granted, free of charge, to any person (the "User") | |
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 furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
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
#include <assert.h> | |
#include <stdio.h> | |
#include <time.h> | |
#define LONG_SPACED_STRING \ | |
" " \ | |
" " \ | |
" " \ | |
" " \ | |
" " \ |
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
AlignAfterOpenBracket: BlockIndent | |
AlignArrayOfStructures: Right | |
AlignConsecutiveAssignments: Consecutive | |
AlignConsecutiveBitFields: Consecutive | |
AlignConsecutiveDeclarations: Consecutive | |
AlignConsecutiveMacros: Consecutive | |
AlignEscapedNewlines: Right | |
AlignOperands: DontAlign | |
AlignTrailingComments: false | |
AllowAllParametersOfDeclarationOnNextLine: false |
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/sh | |
which yt-dlp | |
yt-dlp -i -x --audio-format mp3 $@ |
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
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
HISTCONTROL=ignoreboth | |
shopt -s histappend | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 |
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
<h1>Editing {{.Title}}</h1> | |
<form action="/save/{{.Title}}" method="POST"> | |
<div><textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea></div> | |
<div><input type="submit" value="Save"></div> | |
</form> |
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
#include <iostream> | |
void coutArray(float array[], int n) { | |
for (auto i = 0; i < n - 1; ++i) std::cout << array[i] << ", "; | |
std::cout << array[n - 1] << std::endl; | |
} | |
__global__ void gpuCopyArray(float dest[], float src[], int n) { | |
int index = blockIdx.x * blockDim.x + threadIdx.x; | |
int stride = blockDim.x * gridDim.x; |
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
# | |
# Montador ridiculamente simples para Assembly de Sagui Vetorial. | |
# Escreve arquivos no formato hex do Logisim Evolution. | |
# (Informações sobre a licença abaixo) | |
# (Licensing information below) | |
# | |
# DÚVIDAS: | |
# | |
# - Como eu uso essa desgraça? | |
# |
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 Calc do | |
defp exec_op(_, "clear"), do: [] | |
defp exec_op([fa | [fb | r]], token) do | |
case token do | |
"+" -> [fa + fb | r] | |
"-" -> [fa - fb | r] | |
"*" -> [fa * fb | r] | |
"/" -> [fa / fb | r] | |
"swap" -> [fb | [fa | r]] | |
end |
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
-module(calc). | |
-export([main_loop/1]). | |
read_tokens() -> | |
case io:get_line("calc> ") of | |
[] -> []; | |
L -> string:tokens(lists:droplast(L), " ") | |
end. | |
exec_token(S, T) -> |
NewerOlder