Skip to content

Instantly share code, notes, and snippets.

@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 10, 2025 20:01
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@ertuncefeoglu
ertuncefeoglu / console_database
Created September 24, 2013 10:26
Delphi command line adodb database connection
program ProjectMysqlADO;
{$APPTYPE CONSOLE}
uses
ActiveX,
DB,
ADODB,
SysUtils;
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 12, 2025 11:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@JustinMcNamara74
JustinMcNamara74 / UserPermissions.sql
Last active January 30, 2025 15:46
#MSSQL List all user permissions/roles for all users
/*
********************************************************************************************************************************
Credits: @Jeremy
Posted: http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database
********************************************************************************************************************************
Security Audit Report
1) List all access provisioned to a sql user or windows user/group directly
2) List all access provisioned to a sql user or windows user/group through a database or application role
3) List all access provisioned to the public role
@mmaelzer
mmaelzer / image-poll.js
Created June 24, 2015 04:35
image polling
/** =========================== SERVER =================================== */
var express = require('express');
var MjpegCamera = require('mjpeg-camera');
var app = express();
// Create an MjpegCamera instance
var camera = new MjpegCamera({
name: 'backdoor',
url: 'http://192.168.7.1/video'
});
@dineshsprabu
dineshsprabu / async_waterfall_example.js
Created January 19, 2016 05:44
NodeJS Async WaterFall Example
var async = require('async');
async.waterfall(
[
function(callback) {
callback(null, 'Yes', 'it');
},
function(arg1, arg2, callback) {
var caption = arg1 +' and '+ arg2;
callback(null, caption);
<#
.SYNOPSIS
Performs a SQL query and returns an array of PSObjects.
.NOTES
Author: Jourdan Templeton - [email protected]
.LINK
https://blog.jourdant.me/post/simple-sql-in-powershell
#>
function Invoke-SqlCommand() {
[cmdletbinding(DefaultParameterSetName="integrated")]Param (
@JustinMcNamara74
JustinMcNamara74 / #MSSQL script_logins.sql
Created June 16, 2016 18:30
Scripts out windows/sql logins for all users
USE [master]
GO
/****** Object: UserDefinedFunction [dbo].[fn_hexadecimal]
Credit - http://weblogs.sqlteam.com/billg/archive/2010/07/08/Scripting-out-SQL-Server-Logins.aspx
****/
SET ANSI_NULLS ON
GO
@tomasevich
tomasevich / nginx_nodejs.md
Last active May 12, 2025 12:14
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц

@jessepearson
jessepearson / storefront-two-columns.css
Last active June 22, 2020 01:34
CSS to add to make Storefront display two columns in mobile views.
ul.products li.product {
width: 46.411765%;
float: left;
margin-right: 5.8823529412%;
}
ul.products li.product:nth-of-type( 2n ) {
margin-right: 0;
}