Skip to content

Instantly share code, notes, and snippets.

View Devwarlt's full-sized avatar
🎮

Nádio Pontes Devwarlt

🎮
View GitHub Profile
@Devwarlt
Devwarlt / BuildScript.cs
Created September 8, 2019 00:15 — forked from jonathanpeppers/BuildScript.cs
Unity3D Build Script, environment variables
public class BuildScript
{
private static readonly string _versionNumber;
private static readonly string _buildNumber;
static BuildScript()
{
_versionNumber = Environment.GetEnvironmentVariable("VERSION_NUMBER");
if (string.IsNullOrEmpty(_versionNumber))
_versionNumber = "1.0.0.0";
@Devwarlt
Devwarlt / license-badges.md
Created September 19, 2019 20:29 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@Devwarlt
Devwarlt / ShuntingYardParser.cs
Created October 17, 2019 22:51 — forked from istupakov/ShuntingYardParser.cs
C# realization of Shunting-yard algorithm
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace ShuntingYardParser
{
enum TokenType { Number, Variable, Function, Parenthesis, Operator, Comma, WhiteSpace };
@Devwarlt
Devwarlt / commands.md
Last active May 5, 2021 13:58
Useful Git commands

Commands

  • change default remote HEAD branch: git remote set-head origin <branch>
  • show local branches: git branch
  • show all branches (even deleted): git branch --all
  • delete local branch: git branch -d <branch>
  • delete remote branch: git push origin --delete <branch> or git push origin :<branch>
  • get git commits: git reflog
  • change git name: git config --global user.name "<name>"
  • change git email: git config --global user.email "<email>"
  • show all branchs (including local): git branch -a
<?
$dbhost = "localhost";
$dbschema = "banco_teste";
$dbuser = "root";
$dbpass = "";
function insertTeste() {
# passo 1: estabelecer conexão com o banco de
# dados via PDO
$con = new \PDO(
@Devwarlt
Devwarlt / chainned_list.c
Created November 13, 2020 19:20
Desafio A2 - Estrutura de Dados
#include "chainned_list.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct chainned_list * create_new_chainned_list(void) {
struct chainned_list * list = (struct chainned_list *) malloc(sizeof(struct chainned_list));
list->current = NULL;
return list;
@Devwarlt
Devwarlt / hbday_bledixon_ne.txt
Created November 18, 2020 23:01
[C++ console fun] Happy Birthday Bledixon by Devwarlt
/$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$
| $$ | $$ | $$ |__/ | $$ | $$ | $$ | $$
| $$ | $$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$ | $$$$$$$ /$$ /$$$$$$ /$$$$$$ | $$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$| $$
| $$$$$$$$ |____ $$ /$$__ $$ /$$__ $$| $$ | $$ | $$__ $$| $$ /$$__ $$|_ $$_/ | $$__ $$ /$$__ $$ |____ $$| $$ | $$| $$
| $$__ $$ /$$$$$$$| $$ \ $$| $$ \ $$| $$ | $$ | $$ \ $$| $$| $$ \__/ | $$ | $$ \ $$| $$ | $$ /$$$$$$$| $$ | $$|__/
| $$ | $$ /$$__ $$| $$ | $$| $$ | $$| $$ | $$ | $$ | $$| $$| $$ | $$ /$$| $$ | $$| $$ | $$ /$$__ $$| $$ | $$
| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$/| $$$$$$$ | $$$$$$$/| $$| $$ | $$$$/| $$ | $$| $$$$$$$| $$$$$$$| $$$$$$$ /$$
|__/ |__/ \_______/| $$____/ | $$____/ \____ $$ |_______/ |__/|__/
@Devwarlt
Devwarlt / max_min_se.c
Created February 18, 2021 23:33
Get min/max from a vector based on inputs.
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int i, v_len = 5;
float inputs[v_len];
for (i = 0; i < v_len; i++) {
printf("Insert a new value for index %d: ", i);
scanf("%f", &inputs[i]);
@Devwarlt
Devwarlt / random_num_gen.c
Created February 18, 2021 23:59
Generates randomly a sequence of 6 numbers on console output.
#include <stdio.h>
#include <conio.h>
#include <stdlib.h> // rand(), srand()
#include <time.h> // time()
int main(void)
{
int i;
printf("Creating 6 random numbers:\n\n");
srand(time(NULL));