Skip to content

Instantly share code, notes, and snippets.

View eyadsibai's full-sized avatar

Eyad Sibai eyadsibai

View GitHub Profile
# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@SrTobi
SrTobi / jetbrains-toolbox.nix
Last active August 29, 2022 23:31
Example of a custom package for your configuration.nix
{ pkgs, stdenv, fetchurl, ... }:
let
name = "jetbrains-toolbox";
version = "1.16.6319";
#version = "1.18.7455";
sha256 = "4e6f333839af8330a09d9d6fdcd6a635c9ca1f0ae239d8f268249dbd095ca880";
jetbrains-toolbox-src = stdenv.mkDerivation {
name = "${name}-src";
@eyadsibai
eyadsibai / _.sql
Created July 28, 2020 13:17
schedule BigQuery on a daily basis
WHERE _PARTITIONTIME >= TIMESTAMP(DATE_SUB(@run_date, INTERVAL 1 DAY)) AND _PARTITIONTIME < TIMESTAMP(DATE_SUB(@run_date, INTERVAL 0 DAY))
blocks = "desktop | | dummy mem cpu volume updates datetime"
width = 816
height = 14
foreground = #bbbece
background = #2a2c41
line-width = 2
line-color = #7285b7
block-prefix = " "
font = 6x13
label-font = "-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1"
@sprestridge
sprestridge / covid19-small-multiples.py
Last active August 8, 2022 09:32
A simple Python script to generate an Edward-Tufte-style, small multiples graph of the case rate (7-day average) by State for the U.S. See the sample output in this blog post: https://sprestridge.net/datavis/python/covid-19/2020/06/05/COVID-Small-Multiples.html
# covid19-small-multiples
import math
import pandas as pd
import numpy as np
import seaborn as sns
# setup for plotting
import matplotlib as mpl
from matplotlib import pyplot as plt
@ld100
ld100 / ArchLinuxWSL2.md
Last active November 21, 2025 07:17
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@gbrow004
gbrow004 / ubuntu-MBP-16.md
Last active November 10, 2025 08:53
Ubuntu on Apple Macbook Pro 16-inch (2019)

Update!

This gist is out of date and I can no longer help much, as I got rid of my Mac.

Please visit T2 Linux website for more and better information:

https://t2linux.org/

Acknowledgements

This gist is just a compilation of the hard work that others have put in. I'm not a software developer, so if there are any mistakes or better ways of doing things, I'd appreciate any suggestions. Here's a list of the real heroes who made this possible:

@kiennq
kiennq / build_emacs.sh
Last active January 29, 2023 20:32
Build emacs-snapshot on Ubuntu 18.04
git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git
cd emacs/
sudo apt install -y autoconf make gcc texinfo libxpm-dev \
libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \
libncurses5-dev libjansson-dev libharfbuzz-dev
./autogen.sh
./configure --with-json --with-modules --with-harfbuzz --with-compress-install \
--with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\
--without-sound --without-imagemagick --without-toolkit-scroll-bars \
--without-gpm --without-dbus --without-makeinfo --without-pop \
@abhishekkrthakur
abhishekkrthakur / slack_notifier.py
Created December 6, 2019 07:53
Slack notification from python
import os
import requests
import json
SLACK_WEBHOOK= os.environ.get("SLACK_WEBHOOK")
def send_message(messages, channel="abhishek", username="beast"):
"""
:param messages: list of texts