Skip to content

Instantly share code, notes, and snippets.

@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@unnitallman
unnitallman / gist:944011
Created April 27, 2011 10:11
sqlite with activerecord outside rails
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => ":memory:"
)

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@arangamani
arangamani / chef_attribute_converge.rb
Last active February 20, 2023 02:44
Dynamically update attribute of a Chef resource during converge phase (Node variable assignment in Compile vs Converge)
# In Chef, when a resource is defined all its variables are evaluated during
# compile time and the execution of the resource takes place in converge phase.
# So if the value of a particular attribute is changed in converge
# (and not in compile) the resource will be executed with the old value.
# Example problem:
# Let's consider this situation where there are two steps involved in a recipe
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed
# in converge phase
# Step 2 is a Chef resource that makes use of the node attribute that was
@abhijith
abhijith / swing.clj
Created December 21, 2009 18:43
miglayout swing clojure experiments
(ns swinger
(:import (java.awt BorderLayout Container Dimension))
(:import (javax.swing JButton JFrame JLabel JPanel JTextField JOptionPane JScrollPane JList ImageIcon JComboBox JSeparator JTable UIManager SwingUtilities AbstractButton JFileChooser JDialog JProgressBar JTabbedPane))
(:import (javax.swing.table AbstractTableModel))
(:import (java.awt.event MouseAdapter MouseListener KeyEvent))
(:import (java.awt Toolkit BorderLayout Dimension Color Dialog$ModalityType))
(:use (clojure.contrib
[miglayout :only (miglayout components)]
[swing-utils :only (add-action-listener add-key-typed-listener make-menubar)])))
@armcknight
armcknight / ugh
Last active May 25, 2021 21:53
UGH - uncrustify git history
#!/bin/sh
# ugh.sh
#
#
# Created by Andrew McKnight on 11/27/14.
#
# UGH: uncrustify git history.
# Creates a new branch and cherry picks a range of commits, uncrustifying any modified .h/.m files.
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@EronWright
EronWright / mesos-on-ubuntu.md
Last active June 3, 2020 13:49
Setup Mesos on Ubuntu 16 (Dev Setup)

Configure Mesos

These instructions are derived from those in the Mesos Community Documentation.

Do the below as root.

Install

cat <<EOF >> /etc/apt/sources.list.d/mesosphere.list
deb http://repos.mesosphere.com/ubuntu xenial main