Skip to content

Instantly share code, notes, and snippets.

View danielcbaldwin's full-sized avatar

Daniel Baldwin danielcbaldwin

View GitHub Profile
@kbeckmann
kbeckmann / bond1.netdev
Created September 13, 2019 17:06
LACP port trunking with systemd-networkd
[NetDev]
Name=bond1
Kind=bond
[Bond]
Mode=802.3ad
MIIMonitorSec=1s
LACPTransmitRate=fast
UpDelaySec=2s
DownDelaySec=8s
@danielcbaldwin
danielcbaldwin / arch_install.sh
Last active September 13, 2018 15:53
Arch Install Manual... dont try to run this file, just follow the steps.
# Boot from the usb, make sure that secure boot is disabled in the BIOS
# Default keymap is set to US
# Connect to wifi
wifi-menu
# Create partitions using cgdisk or fdisk
1 500MB EFI partition # Hex code ef00
2 100% size partition # Hex code 8300
@Daniel15
Daniel15 / 1_README.md
Last active May 6, 2024 06:40
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@danielcbaldwin
danielcbaldwin / delete_dups.py
Created February 17, 2013 06:18
Python script to remove duplicate images / files.
#! /usr/bin/python
# Got this from: http://code.activestate.com/recipes/362459/
import os
import sys
import stat
import md5
filesBySize = {}
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@sent-hil
sent-hil / pictures.markdown
Created August 24, 2012 02:18
River (getriver.com): Keep a programming journal.

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
@meonkeys
meonkeys / skype-notify.py
Created August 22, 2012 17:26 — forked from nzjrs/skype-notify.py
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
@ngauthier
ngauthier / README.md
Created July 5, 2012 20:10
Rdio "native" in linux

I like Rdio and linux. Rdio works great in a browser except for one thing: keyboard shortcuts!!!

When coding, I like to be able to play/pause my music quickly, meaning I don't want to switch windows. I figured out a way to do this:

Google Chrome --app

First, I made a file in my ~/bin called rdio that runs:

google-chrome --app=http://rdio.com
@Samuirai
Samuirai / captcha.md
Created June 14, 2012 20:59
G-WAN Captcha Decode

G-WAN is a new free web server. They seem to be very proud of it, or at least just want to make a lot of money. Well anyway, in almost every sentence they write, they claim that they are 20% cooler than anything else. It feels a bit arrogant. I have to admit, I don't know a lot about web servers, so I can't speak to how good they are.

However, then I saw their Captcha example. I also don't know much about machine learning algorithms, OCR, and stuff like that, but I do know how to read pixels. I also know how to compare values with python :P

demo

They say the following about their Captcha:

@lleger
lleger / Rails Migrations Post Merge Git Commit Hook
Created January 14, 2012 08:07 — forked from eddorre/Rails Migrations Post Merge Git Commit Hook
Rails Migrations Post Merge Git Commit Hook
Get notifications when there are migrations that need to be run in a Rails project:
https://img.skitch.com/20110418-c9y3ttap3tai7frc43f38qtb8e.jpg
In your Rails project edit the .git/config file to add the following:
[rails]
automigrate = false
automigrateforegroundcolor = yellow
automigratebackgroundcolor = black