Skip to content

Instantly share code, notes, and snippets.

@robsmith1776
robsmith1776 / bash-cheatsheet.sh
Created May 20, 2019 20:12 — forked from LeCoupa/bash-cheatsheet.sh
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
@robsmith1776
robsmith1776 / SimpleHttpClient.cs
Created April 27, 2017 14:42 — forked from bryanbarnard/SimpleHttpClient.cs
Simple C# .NET 4.5 HTTPClient Request Using Basic Auth and Proxy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
namespace HTTP_Test
@robsmith1776
robsmith1776 / sample_usage.py
Created October 11, 2016 22:20 — forked from luke14free/sample_usage.py
Simple type checked objects in Python
#!/usr/bin/env python
from type_checked_entities import entity_factory
Giraffe = entity_factory( # let's define what is a giraffe!
"giraffe",
name=str, # my name is a string
age=float, # my age is an int
eats=object, # I eat pretty much everything.
)
@robsmith1776
robsmith1776 / mssql_to_csv.py
Created February 26, 2016 00:33 — forked from tinybike/mssql_to_csv.py
simple mssql -> csv file example using pymssql
#!/usr/bin/env python
"""
simple mssql -> csv file example using pymssql
@author [email protected]
"""
import csv
import datetime
import pymssql
from decimal import Decimal
@robsmith1776
robsmith1776 / kill_attrs.py
Created November 19, 2015 16:36 — forked from bradmontgomery/kill_attrs.py
A way to remove all HTML attributes with BeautifulSoup
from BeautifulSoup import BeautifulSoup
def _remove_attrs(soup):
for tag in soup.findAll(True):
tag.attrs = None
return soup
def example():
doc = '<html><head><title>test</title></head><body id="foo" onload="whatever"><p class="whatever">junk</p><div style="background: yellow;" id="foo" class="blah">blah</div></body></html>'