Skip to content

Instantly share code, notes, and snippets.

View devcfgc's full-sized avatar
:octocat:
planning

Carlos Gomez devcfgc

:octocat:
planning
View GitHub Profile
@devcfgc
devcfgc / install_ubuntu_sw.md
Last active May 5, 2020 05:57
Everything I need to start from an ubuntu installation from scratch
@devcfgc
devcfgc / change_database_collation.sql
Last active January 22, 2019 07:13
Change database collation and unlink any connection to the database to execute the operation
USE master;
GO
ALTER DATABASE DATABASE_NAME
SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE DATABASE_NAME
COLLATE Latin1_General_CI_AS ;
GO

Docker Container Name

A one paragraph description about the container.

Getting Started

These instructions will cover usage information and for the docker container

Prerequisities

@devcfgc
devcfgc / README-Template.md
Created October 15, 2018 13:53 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@devcfgc
devcfgc / grafana_dashboards_backup.sh
Created November 3, 2017 11:02
backup grafana dashboard templates
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
KEY=<api_token_key>
HOST="http://localhost:3000"
if [ ! -d $SCRIPT_DIR/dashboards ] ; then
mkdir -p $SCRIPT_DIR/dashboards
fi
@devcfgc
devcfgc / ThreadSafeList.cs
Created August 4, 2017 04:41
Thread Safe List in C#
##https://stackoverflow.com/questions/5874317/thread-safe-listt-property
public class ThreadSafeList<T> : IList<T>
{
protected List<T> _interalList = new List<T>();
// Other Elements of IList implementation
public IEnumerator<T> GetEnumerator()
{
return Clone().GetEnumerator();
@devcfgc
devcfgc / xamarin.cs
Created July 26, 2017 04:03
xamarin code snippets
####################################################
## call CrossPluginName.IsSupported to check if it exists support for this plugin/library with net standard
## http://motzcod.es/post/162402194007/plugins-for-xamarin-go-dotnet-standard
####################################################
if(!CrossGeolocator.IsSupported)
return;
var position = await CrossGeolocator.Current.GetPositionAsync(TimeSpan.FromSeconds(10));
@devcfgc
devcfgc / consul_glossary.md
Created April 23, 2017 14:12 — forked from g0t4/glossary.md
Consul and related terms
  • Node - a physical or virtual machine that hosts services
    • Nodes also referred to as members.
    • Examples
      • Your computer
      • An AWS EC2 instance
      • A bare metal machine in your private data center
  • Service - executing software that provides utility via an interface
    • Typically long-lived process listening on a port(s)
    • Examples
  • A web server (nginx, apache, iis)
@devcfgc
devcfgc / tmux.md
Last active October 30, 2017 11:25
tmux commands

.tmux.conf

set-option -g allow-rename off set -g status-bg cyan set-option -g prefix C-a unbind C-b

key bindings

tmux may be controlled from an attached client by using a key combination of a prefix key, ‘C-b’ (Ctrl-b) by default, followed by a command key.

  • ? List all key bindings.
@devcfgc
devcfgc / fix_network_manager_ubuntu.txt
Last active March 24, 2020 01:34
fix network-manager ubuntu resolv.conf
http://askubuntu.com/questions/627899/nameserver-127-0-1-1-in-resolv-conf-wont-go-away
NetworkManager is the program which (via the resolvconf utility) inserts address 127.0.1.1 into resolv.conf. NM inserts that address if an only if it is configured to start an instance of the dnsmasq program to serve as a local forwarding nameserver. That dnsmasq instance listens for queries at address 127.0.1.1.
If you do not want to use a local forwarding nameserver then configure NetworkManager not to start a dnsmasq instance and not to insert that address. In /etc/NetworkManager/NetworkManager.conf comment out the line dns=dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono