Skip to content

Instantly share code, notes, and snippets.

View carrilloapps's full-sized avatar
📷
https://instagram.com/carrilloapps

José Carrillo carrilloapps

📷
https://instagram.com/carrilloapps
View GitHub Profile
@carrilloapps
carrilloapps / gist:d96a16c5700d6401065bc826b19ff8c2
Created February 17, 2023 15:03 — forked from solenoid/gist:1372386
javascript ObjectId generator
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};
@carrilloapps
carrilloapps / oh-my-fish.md
Created September 16, 2019 00:03 — forked from frfahim/oh-my-fish.md
Install fish shell and oh-my-fish on ubuntu

First install fish shell on your system

sudo apt-get update
sudo apt-get install fish

Or install fish via ppa

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update

sudo apt-get install fish``

@carrilloapps
carrilloapps / media-query.css
Created September 5, 2019 21:01 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@carrilloapps
carrilloapps / whois.php
Created September 18, 2017 20:53
PHP code to get WHOIS information of a domain
<?php
/*************************************************************************
php easy :: whois lookup script
==========================================================================
Author: php easy code, www.phpeasycode.com
Web Site: http://www.phpeasycode.com
Contact: [email protected]
*************************************************************************/
$domain = $_GET['domain'];
@carrilloapps
carrilloapps / superlog
Created September 7, 2017 04:19 — forked from gollum23/superlog
Superlog Curso git platzi
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
@carrilloapps
carrilloapps / GoMgoSample-1.go
Created May 6, 2017 02:02 — forked from ardan-bkennedy/GoMgoSample-1.go
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@carrilloapps
carrilloapps / mgoExample.go
Created May 5, 2017 22:22 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@carrilloapps
carrilloapps / .Title
Created May 3, 2017 02:04 — forked from congjf/.Title
Using MongoDB in golang with mgo
Using MongoDB in golang with mgo