Skip to content

Instantly share code, notes, and snippets.

@vmu9999
vmu9999 / restart-bluetooth-osx.sh
Created March 17, 2020 09:56
Shell script to restart bluetooth daemon for macOS.
#!/bin/bash
echo "Restarting bluetooth daemon for OSX"
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
echo "Complete"
@vmu9999
vmu9999 / 4chan-webm-guide.md
Last active June 18, 2019 14:53
4chan Audio WebM Guide

4chan Audio WebM Guide

Download FFmpeg https://www.ffmpeg.org/download.html FFmpeg is a command line tool, which means there is no GUI. You are going to have to input commands via the keyboard instead of clicking the mouse.

Current Limitations for WebM files on 4chan are:

Maximum file size is 4096KB.

Maximum duration is 300 seconds.

@vmu9999
vmu9999 / example
Created March 12, 2012 02:53
node.js
var fs = require('fs')
, sys = require('sys');
fs.readFile('treasure-chamber-report.txt', function(report) {
sys.puts("oh, look at all my money: "+report);
});
fs.writeFile('letter-to-princess.txt', '...', function() {
sys.puts("can't wait to hear back from her!");
});
@vmu9999
vmu9999 / itunes.rxml
Created March 7, 2012 15:04
Mocha functional tests
xml.rss('xmlns:itunes' => "http://www.itunes.com/dtds/podcast-1.0.dtd", "version" => "2.0") do
if @channel
xml.channel do
xml.title @channel.organization
xml.link player_url(@channel)
xml.description @channel.description
xml.tag! 'itunes:author', @channel.organization
xml.tag! 'itunes:summary', @channel.description
xml.itunes:owner do
xml.tag! 'itunes:name', @channel.organization
@vmu9999
vmu9999 / RoR question
Created January 1, 2011 22:56
RoR question
###Rails console
>> @users = User.all
=> [#<User id: 1, name: "Jordan Staub", email: "js648@drexel.edu", created_at: "2010-12-23 08:13:33", updated_at: "2010-12-23 08:13:33", encrypted_password: "834d11c57684c5c6093317dfee9e5a5f46ce3d39552a2062df6...", salt: "3d105e687dd215bba43d622fc016a57e8e79fddf59372c4251a...">, #<User id: 2, name: "Moondancer", email: "dmstaub@aol.com", created_at: "2011-01-01 03:06:44", updated_at: "2011-01-01 03:06:44", encrypted_password: "d0c9a730bb33c2edad49b93c310545b3b21790580485a3501a1...", salt: "fa6b409e1e2caabae401df83c9e89e9c337ffcc5aef57c34e60...">]
### the User index view
<% @users.each do |u| %>
<tr>
<td><%= u.name %></td>