Skip to content

Instantly share code, notes, and snippets.

@arttuladhar
arttuladhar / softwareengineeringexcel.md
Created July 31, 2015 04:06
Software Engineering Competency Checklist

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array
@ShawnMilo
ShawnMilo / validate_uuid4.py
Created December 3, 2013 20:55
Validating a uuid4 with Python.
from uuid import UUID
def validate_uuid4(uuid_string):
"""
Validate that a UUID string is in
fact a valid uuid4.
Happily, the uuid module does the actual
checking for us.
Smith,
Johnson,
Williams,
Brown,
Jones,
Garcia,
Miller,
Davis,
Rodriguez,
Martinez,
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 5, 2024 17:32
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@davidmreed
davidmreed / simple-salesforce-jwt.py
Created January 15, 2019 01:32
Using simple_salesforce with JWT authentication
import jwt
import requests
import datetime
from simple_salesforce import Salesforce
from simple_salesforce.exceptions import SalesforceAuthenticationFailed
def jwt_login(consumer_id, username, private_key, sandbox=False):
endpoint = 'https://test.salesforce.com' if sandbox is True else 'https://login.salesforce.com'
jwt_payload = jwt.encode(
{
@david-hoze
david-hoze / checksum_calculation.md
Last active May 5, 2024 17:27
How to Calculate IP/TCP/UDP Checksum
@Roxedus
Roxedus / MAC-xxxxxxxxxxxx.ipxe
Last active May 5, 2024 17:27
Netboot.xyz Talos unattended
#!ipxe
set talos_type controlplane
chain talos-unattended.ipxe
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="any">
<meta>
<author>Picplz</author>
<documentationURL>http://picplz.com</documentationURL>
<sampleQuery>select * from {table} WHERE entity='feed' AND type='interesting'</sampleQuery>
<sampleQuery>select * from {table} WHERE entity='city' AND id=2 AND include_pics=1</sampleQuery>
<sampleQuery>select * from {table} WHERE entity='user' AND username='zubillaga' AND include_pics=1;</sampleQuery>
</meta>
<bindings>
@voidfiles
voidfiles / join_text_url.py
Created February 15, 2011 07:09
Joins a piece of text with a url to form max length tweet
long_tweet = 'asdfasdf asd fasd fasdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdfasdf asdfasdfas dfasd fasd fasdf asdf asdf asdf asdf asdf asdf '
short_tweet = 'asdfasdf asd fasd fasdf asdf asdf asdf asdf asdf asdf asdf asdf'
url = "http://sia.tw/4fgs4"
def join_url(tweet, url):
max_tweet_length = 139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
@font-face {
font-family: 'Win95F';
src: url('data:application/font-woff2;base64,d09GMk9UVE8AAB7IAAoAAAAAfLQAAB54AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYHcRQZgAIpcATYCJAOFAAQGP21ldGGCBAWHeQcgG/17FeyYl7gdUKg+MzYSIWwchCaAJ1GUTdZM2f+fEtQxhLpXsjlMOBl1rtM5kVqBMp1XeGh4M/bhm1fyGODBICrJYyX3cIpIfVYz8+zf7k/1poo76F5SyxV35u42RuK58Pyzv//2ufiSI5FINEWNWcddrlPZZr353F4vNRtmfpL6FyCmfDO+2gEHHHZoxKaa7jrsXaZOHea+XXQOfP8/9vs9cxcVqniikQnZQ7JE62SzSFJJlfXTq1/snkEVLh3bgX9wrpvZrHU6h4r8an+wJ/mf+G0eKltj8Y0CE6MTzFphsWCV6tY3xQxWaSyijN4a1jYsZYEPgty2j1NBvFO5ztS8L7nCE3R9JjsC1hSKoT3X3uY/v7/vz137WW3kOP6K38nIPwlujGIbNkGXOwLg//99U20JOQ0Yh4DD0LlU0bhPcFDIsBzy6t0Td7+5d9mjCFAJA0VwEQ4h4M07M9/hM0P5S4sBznkkVa5S5dxVIbUt2bl0SRWdWndyVbjrtXoXfWko9Ixf8mAlKsgL1qjQb5oCz6Y4siXFEeB8+MN2upYd8LuBdoR/31iLxhoVBZhAB3bnZRRIIKn3s59aH/bm9DqFEgRElDEz/m5qk9vHmEbteKX0j35isACCAoJ0hS2/QNAEEf