Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
thewisenerd / dont-run-this-lmao.sh
Created November 16, 2022 21:34
installing facebook prophet on macOS arm64
brew install python@3.11
python3.11 -m pip install cmdstanpy
python3.11 -m pip install prophet # this should work ? if it dont, good luck lmao
# at this point, you might get an error
# RuntimeError: Error during optimization! Command '/opt/homebrew/lib/python3.11/site-packages/prophet/stan_model/prophet_model.bin
# dyld[71677]: Library not loaded: '@rpath/libtbb.dylib'
cd /opt/homebrew/lib/python3.11/site-packages/prophet/stan_model
install_name_tool -add_rpath @executable_path/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb prophet_model.bin
# 'Prophet.fit' should no longer throw a fit haha
@antonavy
antonavy / ipv6-httpd.py
Last active October 31, 2016 13:02 — forked from akorobov/ipv6-httpd.py
quick ipv6 http server using python's SimpleHttpServer
import socket
from http.server import HTTPServer
from http.server import SimpleHTTPRequestHandler
class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/ip':
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@ruario
ruario / h264-vivaldi-linux.md
Last active March 18, 2023 11:17
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
@Anmo
Anmo / example.sh
Last active April 2, 2024 06:08
Use of submodules and sparse-checkout
#!/bin/bash
#First create a repo
mkdir A && cd A && git init && touch a.dev && touch a.prod && git add -A && git commit -m 'init A' && cd ../
#Lets create another repo that will use A as submodule with sparse-checkout
mkdir B && cd B && git init && touch b && git add -A && git commit -m 'init B'
#Now we will clone A as submodule of B and will say that file/dir we only want to use in B
git submodule add ../A/ A && cd A && git config core.sparsecheckout true && echo a.prod >> ../.git/modules/A/info/sparse-checkout && git read-tree -mu HEAD && cd ../ && git add -A && git commit -m 'add A as submodule/sparse-checkout' && cd ../
@johnhunter
johnhunter / gist:3333533
Created August 12, 2012 18:14
Git configs for a submodule with sparse-checkout filtering
Assuming you have created a submodule 'mysub' in repo 'myrepo'
Set the sparse checkout config property in the submodule
myrepo/.git/modules/mysub/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false