Skip to content

Instantly share code, notes, and snippets.

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
bob ALL=(ALL:ALL) NOPASSWD:ALL
# do code $PROFILE and edit
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
We can't make this file beautiful and searchable because it's too large.
Year,Rank,Company,Revenue (in millions),Profit (in millions)
1955,1,General Motors,9823.5,806
1955,2,Exxon Mobil,5661.4,584.8
1955,3,U.S. Steel,3250.4,195.4
1955,4,General Electric,2959.1,212.6
1955,5,Esmark,2510.8,19.1
1955,6,Chrysler,2071.6,18.5
1955,7,Armour,2056.1,1.6
1955,8,Gulf Oil,1705.3,182.8
1955,9,Mobil,1703.6,183.8
jZhY2xKNRx4Ibg4+qu9wel+CegnHdYBhX3D/hiOnEczFf55ODrCHHtBzsoKomVhrEhtrs/i8P+2kmDeNbFLNNz0bNvXZ7oIywIFh8zttjwA8JPnPNR2RLXr//R9IdFSOW8hQlHF9uduXubhnS4+xOqTuTgzAPlkPBvuF3vpTWIQXuFLIGA+zjB6n5v9xzISeaC+SgLYQB2x07gyuDqVdCR9+DMdO+4slMWy67qQWxnSZjs/jQwEqCCLZeRGRMK1XGHPibt9oRy3RyV1hwWSVt9id66xImmUBqvVzRlr40n6MXdmp3lmGv0KVxcPEd15TdE3Lc8BjGALqOGm64mBuZZZ1Up62hUrapcNIX1oOBi10F0K1YmMPlhtTPILD3PJLnfUBI9nhWpIBGqx3zy5xP7VPRX4uzbQQQC2pNEdu+AfUCOpSkkwe3K8+NWEzyEoT7OGfoXqLWiVkEZdrOw7ITleAzUdo1av1XrHoC27dGi1BmP0rHKgdxDt4X1ppVt6qdv27N2caU4PZDVcjs2AUlOM981R8LaqldMWlMZZRuz7T9VTCkPN9Q80XIMAKaMlyGBurdu3UlqF1GP8ijNik6+wflX4Dl5DClSbdx7Iwaq42n2XLuqvxLInOmAiN5VCjqUdeOHM6L7Eke1EulgHGdMFWCLpkUeR/IQfPJuG6oUsiMiDOETHABm6UXLwrIcbiJHGAkxfLZSXTuex29A9h++445FvdMNIvXwGy3qzwFFGzkDYjkQceBghOaRf0SVTZL6mlvizxIYLD4wZFIFYTJsrt0md3g8XVljDW5+1tKzFEZ54cbwaWfHhRqEprWUlnkaL7Zn8nJDE3gRoRBXL8hYScR+N20Q6zbnkrrsKjcFJuMlEPYI9xx+2g46PQCdVXWceKOd9J2dpre0eCFUxqPzrvCPOKR99J0JHew36aX2khUEt8SU5V856uCuc9ccsVkHIPZruGrVFYlBfi2RyKGydwlGkHPGeFg2KPw1epeyuV5bK1xJ3BZDm2Xa1EEDjQ
@bobbae
bobbae / loomings.txt
Created September 4, 2020 19:49
first chapter moby dick
Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people’s hats off—then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, s
@bobbae
bobbae / Longest compound word quiz.md
Last active October 12, 2020 07:08
Longest compound word quiz

Write a program that reads a file containing a sorted list of words (one word per line, no spaces, all lower case), then identifies the longest word in the file that can be constructed by concatenating copies of shorter words also found in the file.

For example, if the file contained:

       cat
       cats
       catsdogcats
 catxdogcatsrat
@bobbae
bobbae / words.txt
Created October 12, 2020 07:06
words.txt
This file has been truncated, but you can view the full file.
aa
aaa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
@bobbae
bobbae / unscientific-gcsfuse-vs-gsutil-benchmark.md
Last active April 17, 2024 04:01
A very crude benchmark for gcs (google cloud storage) fuse vs gsutils
  1. Create/use service account with "storage admin" role and download the key in json format.

  2. activate service account

  gcloud auth activate-service-account --key-file=/home/bob/bob-key.json /home/bob/tmpmnt/
  1. create a bucket
    gsutil mb gs://bobtest1
from google.cloud import bigquery
project_id = "XXXX-XXXXX"
# Construct a BigQuery client object.
client = bigquery.Client(project=project_id)
dataset_id = project_id + ".example_dataset1"
print("dataset_id",dataset_id)
#dataset = client.get_dataset(dataset_id)
@bobbae
bobbae / get-iam-policy.py
Last active February 12, 2021 19:05
GCP: get a list of projects with roles/owner permission
import subprocess
import json
projects = subprocess.Popen(['gcloud', 'projects', 'list', '--format=json'], stdout=subprocess.PIPE).communicate()[0]
projects2 = json.loads(projects.decode('utf-8').replace('\n', ' '))
for proj in projects2:
projid = proj['projectId']
try: