Skip to content

Instantly share code, notes, and snippets.

View theShiva's full-sized avatar
🎯
Focusing

Shiva Kumar theShiva

🎯
Focusing
View GitHub Profile
@asadoughi
asadoughi / edgar.ipynb
Created August 9, 2017 01:27
CFSheet Jupyter Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evgeny-myasishchev
evgeny-myasishchev / generate_dto.sql
Last active September 4, 2023 20:23
TSQL script to generate POCO/DTO from database table
DECLARE @tableName NVARCHAR(MAX), @schemaName NVARCHAR(MAX), @className NVARCHAR(MAX)
--------------- Input arguments ---------------
SET @tableName = 'Incidents'
SET @schemaName = 'dbo'
SET @className = 'IncidentDto'
--------------- Input arguments end -----------
DECLARE tableColumns CURSOR LOCAL FOR
SELECT cols.name, cols.system_type_id, cols.is_nullable FROM sys.columns cols
@rfmeier
rfmeier / functions.php
Last active January 7, 2022 15:09
Enable taxonomy wildcard name searching within WordPress search.
<?php
/**
* Callback for WordPress 'pre_get_posts' action.
*
* If doing a search, set the post type to 'post'.
*
* @author Ryan Meier http://www.rfmeier.net/
*
@andrewburgess
andrewburgess / bootstrap-infiniteScroll.js
Last active January 24, 2024 23:49
Twitter Bootstrap plugin that enables infinite scrolling
/* ============================================
* bootstrap-infiniteScroll.js
* ============================================ */
!function ($) {
'use strict';
var InfiniteScroll = function (el, options) {
this.$element = $(el);
this.$data = $(el).data();
this.$options = options;
@eligrey
eligrey / leaks.md
Last active November 22, 2023 23:14
Entities that have sold or leaked my personal data

Eli's leak list

The following entities have either sold or leaked personal data about me, including email addresses and phone numbers. Be wary of sharing your data with them.

Email addresses

These entities have either sold or leaked specific unique email addresses of mine to unauthorized parties, such as spammers.

private static void ArchiveFolder(string folderToArchive, string archivedFile)
{
Uri folderToArchiveUri = new Uri(folderToArchive);
var filesToArchive = Directory.EnumerateFiles(folderToArchive, "*.*", SearchOption.AllDirectories);
using (var fs = new FileStream(archivedFile, FileMode.Create, FileAccess.ReadWrite))
{
using (var archive = new ZipArchive(fs, ZipArchiveMode.Create))
{
filesToArchive
@xiangwan
xiangwan / C php Serializer.cs
Created September 19, 2011 04:50
C# php Serializer
/// <summary>
/// Serializer Class.
/// </summary>
public class Serializer
{
//types:
// N = null
// s = string
// i = int
// d = double