Skip to content

Instantly share code, notes, and snippets.

@alex-hhh
alex-hhh / tetris-4.rkt
Last active November 22, 2023 17:15
Tetris Game, Final Version
;; A tetris game -- partial implementation, part 4
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com)
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 22, 2024 20:58
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@eatonphil
eatonphil / server.ml
Last active April 20, 2024 10:42
A simple threaded web server in SML
(*
* Tested on PolyML. `polyc server.ml && ./a.out`
*)
fun println s =
(print (s ^ "\n"); TextIO.flushOut TextIO.stdOut)
fun readAll conn req =
let val ntoread = Socket.Ctl.getNREAD conn in
if ntoread > 0
@mutolisp
mutolisp / mdb2postgres.sh
Created November 12, 2014 09:24
Convert Microsoft Access *.mdb file into PostgreSQL database
#!/usr/bin/env bash
# install mdbtools first!
# mdbtools: https://github.com/brianb/mdbtools
# ref: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
DBMS=postgres
for MDB in `ls | grep .mdb$`
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
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!






\

@jamesbarnett
jamesbarnett / gist:9106565
Created February 20, 2014 03:23
First stab at a Makefile for building libcinder apps on Mavericks
CC=g++
CFLAGS=-g -Wall -std=c++11 -I/usr/local/include -I/Users/jbarnett/cinder/include
LIBPATH += -L"/System/Library/Frameworks/CoreLocation.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/Accelerate.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/ApplicationServices.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/QuickTime.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/Carbon.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/Cocoa.framework/Resources"
LIBPATH += -L"/System/Library/Frameworks/OpenGL.framework/Libraries"
@jvns
jvns / interview-questions.md
Last active May 14, 2024 18:47
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

require 'sinatra'
require 'net/ldap'
ldap = Net::LDAP.new
ldap.host = '192.168.1.1'
ldap.port = 389
ldap.auth "username", "password"
treebase = "dc=reputablecompany, dc=com"