Skip to content

Instantly share code, notes, and snippets.

View nassor's full-sized avatar

Nassor Paulino da Silva nassor

View GitHub Profile
@nassor
nassor / Program.cs
Created May 5, 2021 15:55 — forked from andrewloable/Program.cs
Use a library compiled in Go in c# (.net)
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace GoSharedDLL
{
class Program
{
[DllImport("shared.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
private static extern IntPtr ReturnReversedString(byte[] input);
@nassor
nassor / .gitattributes
Created August 20, 2019 14:25
.gitattributes for Unity (from github plugin)
* text=auto
# Unity files
*.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff
*.asset -text merge=unityyamlmerge diff
*.prefab -text merge=unityyamlmerge diff
*.mat -text merge=unityyamlmerge diff
*.anim -text merge=unityyamlmerge diff
*.controller -text merge=unityyamlmerge diff
@nassor
nassor / compressor.go
Last active March 16, 2021 20:15
Zlib Compress in Go -> Redis List -> Zlib Uncompress in Ruby
package main
import (
"bytes"
"compress/zlib"
"fmt"
"time"
"github.com/vmihailenco/msgpack"
redis "gopkg.in/redis.v5"
package filter
import (
"fmt"
"testing"
"time"
"github.com/nats-io/nuid"
)
@nassor
nassor / clean_docker.sh
Created August 17, 2016 10:40
Clean all docker containers and images
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
Verifying that +nassor is my blockchain ID. https://onename.com/nassor
@nassor
nassor / gulpfile.js
Last active November 13, 2015 19:19
Gulp + React
/*
gulpfile.js
Directory structure
./dist [webapp compiled]
./src/ [webapp code]
./src/app [react code]
./src/assets [css and js files]
*/
var argv = require('yargs').argv;
mongoexport -d <db_name> -c <coll_name> -f <fields_name> -q "<json_query>" --csv --out out_file.csv
@nassor
nassor / dbbackup.sh
Created November 13, 2013 07:53
Backup and compact a MongoDB database
#!/bin/bash
cd /data/backups/
mongodump -d <dbname>
today=$(date +"%Y%m%d") && tar cvzf "<dbname>-$today.tar.gz" dump/
@nassor
nassor / stopwords.txt
Last active December 17, 2015 21:39 — forked from lorn/stopwords.txt
"abaixo", "aca", "acaso",
"acerca", "acima", "acola", "acula", "ademais", "adentro",
"adiante", "afinal", "afora", "agora", "agorinha", "ah", "ainda",
"alem", "algo", "alguem", "algum", "alguma", "algumas", "alguns",
"ali", "alias", "alo", "ambos", "amiude", "ante", "antes", "ao",
"aonde", "aos", "apenas", "apesar", "apos", "apud", "aquela",
"aquelas", "aquele", "aqueles", "aqui", "aquilo", "as", "assim",
"ate", "atras", "atraves", "basicamente", "bastante", "bastantes",
"bem", "bis", "bom", "ca", "cada", "cade", "caso", "certa",
"certamente", "certas", "certeiramente", "certo", "certos", "chez",