Skip to content

Instantly share code, notes, and snippets.

View SamSharaf's full-sized avatar

Sam Sharaf SamSharaf

  • South Bay area
View GitHub Profile
@mouse-reeve
mouse-reeve / fizzbuzz.py
Last active April 22, 2022 06:33
Fizzbuzz via answers.com
''' we're solving fizzbuzz with a little help from the web '''
from html.parser import HTMLParser
from urllib.request import Request, urlopen
import re
import time
base_url = 'https://www.answers.com/Q/'
tag_name = 'div'
class_name = 'answer-body'
delimiter = '_'
@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@veggiemonk
veggiemonk / .gitconfig
Last active April 14, 2025 17:24
simple zshrc config file with Oh-My-ZSH
[user]
name = Julien Bisconti
email = ******
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/vim
[alias]
wow = log --all --graph --decorate --oneline --simplify-by-decoration
@HannesHolste
HannesHolste / setup_mac_dev.sh
Created June 23, 2016 23:54
Setup a new mac with basic dev tools and applications like Google Chrome, leaning on homebrew where possible (except for python -- uses conda)
# Mac OSX development setup (data science, python)
# v1.0
cd $HOME
echo "This script sets up a basic software eng / data science environment on Mac OSX."
echo -n "You can edit this file to customize what should be installed."
echo "Exit to do so via [CTRL-C], otherwise press [ENTER] to continue..."
read
USER_DIR=$(pwd | xargs echo -n)
echo "Requesting admin permissions..."
sudo su -
@willurd
willurd / web-servers.md
Last active October 24, 2025 16:17
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@esycat
esycat / build.gradle
Last active June 6, 2018 21:48
An example Gradle build configuration that shows that `ext` does not always point to the same object as `project.ext`. The assertion on line 10 fails.
assert(project.ext == ext)
// assigning some values just for testing
project.ext.set('a', 'a-val')
ext.set('b', 'b-val')
assert(project.ext == ext)
task test() {
assert(project.ext == ext)