Skip to content

Instantly share code, notes, and snippets.

View fzakaria's full-sized avatar

Farid Zakaria fzakaria

View GitHub Profile
@headius
headius / gist:39cafe3307db887285aba3000ad3c19f
Created January 24, 2020 17:39
Using JDB to debug Ruby and JRuby code together
[] ~/projects/jruby $ jdb -Djruby.home=`pwd` -sourcepath `pwd` -classpath lib/jruby.jar
Initializing jdb ...
> stop at blah:1
Deferring breakpoint blah:1.
It will be set after the class is loaded.
> run org.jruby.Main blah.rb
run org.jruby.Main blah.rb
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
@nh2
nh2 / nixos-rootfs.nix
Last active March 27, 2024 14:34
Example of how to build a NixOS root file system
# Build with:
# NIX_PATH=nixpkgs=$HOME/src/nixpkgs nix-build --no-link '<nixpkgs/nixos>' -A config.system.build.tarball -I nixos-config=thisfile.nix
# You can also use
# -A config.system.build.toplevel
# to build something you can browse locally (that uses symlinks into your nix store).
{config, pkgs, ...}:
{
# We need no bootloader, because the Chromebook can't use that anyway.
boot.loader.grub.enable = false;
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by mike@mikepearce.net
#
# Generate an SVN-compatible diff against the tip of the tracking branch
# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/branches\///'`