Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
##--------------------------
## Terraform: Functions ##
##--------------------------
## Open terraform console
terraform console
#######################
## Numeric Functions ##
#######################
@jrichardsz
jrichardsz / devops sql - cdn.md
Last active October 1, 2024 23:48
devops sql

113512181-1a965b00-956c-11eb-8ac6-e046c11ba368

@jrichardsz
jrichardsz / environment variables snippets - nodejs.md
Created September 30, 2024 14:32
environment variables snippets
var express = require('express');
var app = express();

app.get('/', function(req, res) {
  res.type('text/plain');
  res.send('Hell , its about time!!');
});
@jrichardsz
jrichardsz / database advanced snippets - sql.md
Created September 17, 2024 20:52
database advanced snippets

use quotes in table name

INNER JOIN acmeschema."FooTable"

solution

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO

@jrichardsz
jrichardsz / sql dependencies - snippets - sqlserver.md
Created September 17, 2024 17:27
sql dependencies - snippets
SELECT OBJECT_NAME(referencing_id) AS referencing_entity_name,   
    o.type_desc AS referencing_desciption,   
    COALESCE(COL_NAME(referencing_id, referencing_minor_id), '(n/a)') AS referencing_minor_id,   
    referencing_class_desc,  
    referenced_server_name, referenced_database_name, referenced_schema_name,  
    referenced_entity_name,   
    COALESCE(COL_NAME(referenced_id, referenced_minor_id), '(n/a)') AS referenced_column_name,  
    is_caller_dependent, is_ambiguous  
FROM sys.sql_expression_dependencies AS sed 
@jrichardsz
jrichardsz / visual code vs snippets.md
Created September 12, 2024 16:34
visual code vs snippets

select regex results

alt+enter

@jrichardsz
jrichardsz / mobile dimensions snippets.md
Last active August 23, 2024 04:50
mobile dimensions snippets
@jrichardsz
jrichardsz / nodejs socketio socket.io snippets - helloworld.js
Created August 17, 2024 13:43
nodejs socketio socket.io snippets
const express = require('express');
const fs = require('fs')
const path = require('path')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server,{maxHttpBufferSize: 1e7})
io.on('connection', function (socket) {
console.log("headers at connection:")
console.log(socket.handshake.headers)
@jrichardsz
jrichardsz / csharp c# crud - mysql.md
Created August 4, 2024 23:48
csharp c# crud - mysql

Select

// dotnet add package MySql.Data --version 9.0.0

using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;