Skip to content

Instantly share code, notes, and snippets.

View cristianbgp's full-sized avatar
🏠
Working from home

Cristian Granda cristianbgp

🏠
Working from home
View GitHub Profile
using System;
class Test{
string word;
void Main(){
word = "i don´t know how to code :)";
print(word);
}
function validParentheses(parens) {
pairLenght = parens.length;
for (let i = 0; i < pairLenght; i++) {
parens = parens.replace('()','');
}
return parens.length < 1;
}
//Get the sum of all the numbers between a and b
function GetSum( a,b )
{
sum = 0;
if(a<b){
for (let i = a; i <= b; i++) {
sum += i;
}
@cristianbgp
cristianbgp / CharacterController2D.cs
Created January 30, 2019 01:26
A Basic Character Controller 2D platform, includes jump and crouch
using UnityEngine;
using UnityEngine.Events;
public class CharacterController2D : MonoBehaviour
{
[SerializeField] public float m_JumpForce = 400f; // Amount of force added when the player jumps.
[Range(0, 1)] [SerializeField] private float m_CrouchSpeed = .36f; // Amount of maxSpeed applied to crouching movement. 1 = 100%
[Range(0, .3f)] [SerializeField] private float m_MovementSmoothing = .05f; // How much to smooth out the movement
[SerializeField] private bool m_AirControl = false; // Whether or not a player can steer while jumping;
[SerializeField] private LayerMask m_WhatIsGround; // A mask determining what is ground to the character
javascript:document.designMode = document.designMode === "on" ? "off" : "on"; void 0
@cristianbgp
cristianbgp / bin.js
Last active December 14, 2020 21:39
Nvidia rtx scrapper
#!/usr/bin/env node
const puppeteer = require("puppeteer");
const links = [
"https://www.sercoplus.com/video-nvidia-geforce-rtx/11817-vga-msi-geforce-nvidia-rtx-3060-ti-ventu.html",
"https://www.sercoplus.com/video-nvidia-geforce-gtx/11816-vga-msi-geforce-nvidia-rtx-3060-ti-gamin.html",
];
(async () => {
class="[a-zA-Z0-9:;\.\s\(\)\-]*"