![photo](https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Categorizable | |
module ClassMethods | |
def acts_as_categorizable | |
has_many :audience_scopes, :as => :audienciable | |
has_many :audience_categories, :through => :audience_scopes | |
has_many :areas, :through => :audience_scopes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
#ported to ubuntu from https://gist.github.com/1024587 | |
#it will ask for sudo privileges. | |
#if your wlan card is not "wlan0" change the "my_wifi_card" variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<td class="Text13Grey numeric"> | |
<span id="invoice_paid_status_<%= invoice.url_id %>"> <%= partial_payment_in_redbox(invoice) %></span> | |
</td> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update System | |
# ------------------------------------------------------------------------------ | |
echo 'Updating System...' | |
sudo apt-get -y update | |
# Hardware | |
# ------------------------------------------------------------------------------ | |
echo 'Installing bumblebee' | |
sudo add-apt-repository -y ppa:bumblebee/stable && sudo apt-get update | |
sudo apt-get -y install bumblebee bumblebee-nvidia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With help from https://aws.amazon.com/blogs/ai/build-your-own-face-recognition-service-using-amazon-rekognition/ | |
frame_skip = 100 # analyze every 100 frames to cut down on Rekognition API calls | |
import boto3 | |
import cv2 | |
from PIL import Image | |
import io | |
rekog = boto3.client('rekognition') |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- allSettings is a list of records containing {width:? height:? apps:{{name:? pos:? size:?},...} | |
-- for each display setup store the apps and their associated position and size | |
property allSettings : {} | |
-- create a variable for the current settings | |
set currentSettings to {} | |
display dialog "Restore or save window settings?" buttons {"Restore", "Save"} default button "Restore" | |
set dialogResult to result |