Skip to content

Instantly share code, notes, and snippets.

View dannysofftie's full-sized avatar
A notable part of my job is unzipping things that aren't intended to be unzipped

Daniel Kimani dannysofftie

A notable part of my job is unzipping things that aren't intended to be unzipped
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active July 7, 2024 12:44
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@dannysofftie
dannysofftie / javascript-form-data.js
Created October 18, 2018 08:28
Retrieve form data into a JavaScript object for sending to server using Ajax or fetch, including multiple checkboxes, multiple select options, multiple radio buttons, and multiple file uploads.
/**
* extracts form data, including checkboxes, multiple select options,
* multiple file uploads,
* and returns an iterable
* @param {HTMLFormElement} form form to extract data
*/
function extractFormData(form) {
if (typeof form == 'undefined')
throw new Error('Requires a form to iterate')
else {
@dannysofftie
dannysofftie / minio-bucket-name-validator.js
Last active September 7, 2021 15:58
Validate Minio Bucket names.
function isValidBucketName(bucketName) {
if (typeof bucketName !== 'string') return false
// bucket length should be less than and no more than 63
// characters long.
if (bucketName.length < 3 || bucketName.length > 63) {
return false
}
// bucket with successive periods is invalid.
if (bucketName.indexOf('..') > -1) {