Skip to content

Instantly share code, notes, and snippets.

View matiasvallejosdev's full-sized avatar
🎯
Focusing

Matias Vallejos matiasvallejosdev

🎯
Focusing
View GitHub Profile
@mstevenson
mstevenson / MonoBehaviourSingleton.cs
Created December 18, 2012 04:51
Generic Singleton classes for Unity. Use MonoBehaviourSingletonPersistent for any singleton that must survive a level load.
using UnityEngine;
using System.Collections;
public class MonoBehaviourSingleton<T> : MonoBehaviour
where T : Component
{
private static T _instance;
public static T Instance {
get {
if (_instance == null) {
@yyx990803
yyx990803 / starcounter.js
Last active May 29, 2024 20:41
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@FullStackForger
FullStackForger / .gitignore
Last active July 24, 2024 04:22
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@cgonzalezdai
cgonzalezdai / como-subir-un-proyecto-local-a-github.md
Last active July 27, 2024 18:56
Como subir un proyecto local a github

Como subir un proyecto local a github.

desde la web de github

Creamos un nuevo repositorio en https://github.com. Le damos nombre, descripción, seleccionamos si va a ser un proyecto publico o privado si es el caso, y dejamos el check de crear README sin marcar. Le damos a crear repositorio y con esto ya tenemos el repositorio donde alojaremos nuestro proyecto.

desde la terminal del equipo donde esta el proyecto que queremos subir a github

Nos vamos a la carpeta del proyecto y ejecutamos estos comandos.

git init

git add .
@wojteklu
wojteklu / clean_code.md
Last active July 27, 2024 06:43
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@frfahim
frfahim / install virtualenv ubuntu 16.04.md
Last active May 20, 2024 06:45
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@fmachado
fmachado / soap-and-rest-versus-sql-odbc-access-to-data.md
Created August 9, 2017 13:27
SOAP and REST versus SQL/ODBC Access to Data

Disclaimer While doing a research for a SCADA integration project, I found this document on Google cache as the main site was unavailable. It has some good points and may be useful for anyone looking for this comparison.

Many people question the concept of using SOAP or REST based services to deliver data from a database when they could potentially use SQL/ODBC. In general terms, if your requirement is for complex SQL/ODBC queries, SQL/ODBC is the way to go. However, when the requirement is less about complex queries and more about accessing and/or updating the data, SOAP and REST provides many advantages in today’s' networks.

Feature SQL/ODBC SOAP/REST
Standards While an SQL standard exists, there are different flavors implemented by different databases. Fully standards based using WSDL, SOAP, REST, XML, HTTP and TCP/IP
C
@Fhernd
Fhernd / estadisticas-arreglo.py
Created February 15, 2018 00:10
Estadísticas básicas en Python con Numpy.
import numpy as np
arreglo_primos = np.array([2, 3, 7, 19, 23])
# Promedio:
print(np.mean(arreglo_primos))
print('')
# Mediana:
@vmandic
vmandic / dotnet core .gitignore
Last active July 18, 2024 09:03
A default .NET Core project .gitignore file - or just type `dotnet new gitignore`
# From .NET Core 3.0 you can use the command: `dotnet new gitignore` to generate a customizable .gitignore file
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
# Visual Studio Code
.vscode
// extension awaiter/methods can be used by this namespace
using UniRx.Async;
// You can return type as struct UniTask<T>, it is unity specialized lightweight alternative of Task<T>
// no(or less) allocation and fast excution for zero overhead async/await integrate with Unity
async UniTask<string> DemoAsync()
{
// You can await Unity's AsyncObject
var asset = await Resources.LoadAsync<TextAsset>("foo");