Skip to content

Instantly share code, notes, and snippets.

@cs150bf
cs150bf / adc5g_init.m
Created December 19, 2012 23:41
adc5g initialization script for Matlab 2010 and above. Default values for Downsample block: sample based, allow multi-rate processing
function adc5g_init(blk, varargin)
% Initialize and configure the ASIA 5 GSps ADC
% Declare defaults to be used throughout
defaults = {...
'input_mode', 'Two-channel -- A&C',...
'demux', '1:1',...
'adc_clk_rate', 450,...
'adc_bit_width', 8,...
'adc_brd', 'ZDOK 0',...
# run ipython rww_tools.py -pylab -i
import sys, os, time
import numpy as np
import matplotlib.pyplot as plt
import corr
import adc5g
import fit_cores
# roach_ip = 'roach2-00.cfa.harvard.edu'
roach_ip = 'vegasr2-8'
@cs150bf
cs150bf / NOTES.txt
Last active December 28, 2015 19:58
FFT Unscrambling in Software
These code were written in 2010 trying to modify the CASPER library and make the "Unscramble" option in FFT (complex) blocks optional. The memo describing this process is at - https://drive.google.com/file/d/1qsmW965nrVnAMkiKumTIdqMEaGDK0hechbji_I5gohqrbxGuUBZyUDP7Z-RK/edit?usp=sharing (Written in Summer 2010 with slight revision in October 2013).
Google doc version of fft_init.m, with related changes highlighted is availble at - https://docs.google.com/document/pub?id=1rd4XtOVeFQZ0cYhMqB3m5uoPSdkPAXcNaGGQUtxdD2k
Google doc version of fft_unscramble_init.m, with related changes highlighted is availble at - https://docs.google.com/document/pub?id=1Tq0SjqQyVQIev6N41YnVwKVjNE_-NRVg4kl6A0VrwKM
A quick note on software unscrambing is at - https://docs.google.com/document/d/13TU2CqZM3NziDy4LkQwGHzmg3azJlARHUGoPtQA80SU/edit?usp=sharing (No change made to the library or _init.m scripts - the unscramble on/off function is available for current fft blocks in current Casper library - September 2013 commit)
@cs150bf
cs150bf / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cs150bf
cs150bf / README.md
Last active February 26, 2024 09:59
Create cross reference links in Evernote (OSX)

Create cross reference links in Evernote (OSX)

Create links within a single note.

Requirement

@cs150bf
cs150bf / README.md
Last active December 14, 2019 19:26
Create cross reference links in Evernote [No Ruby] (OSX)

Create cross reference links in Evernote [No Ruby] (OSX)

Create links within a single note. An alternate version for Create cross reference links in Evernote (OSX) that does not require the pasteboard ruby gem.

Requirement

  • OS X (Yosemite and Mavericks)
  • Evernote OSX client (>6.0.0)

Caveat:

@cs150bf
cs150bf / README.md
Last active February 26, 2024 09:54
Clean up cross reference links in Evernote notes (OS X)

Clean up cross reference links in Evernote notes (OS X)

Try to restore TOC links in clipped web pages.

Usage

$ node en-toc-cleanup.js https://www.evernote.com/shard/s68/nl/7746748/1ba826ab-89db-45af-bb96-blah-blah-blah-blah

(The argument is a note link obtained by right clicking a note in EN Mac client and select "Copy Note Link")

@cs150bf
cs150bf / error_message.txt
Created November 13, 2015 16:06 — forked from rdhyee/error_message.txt
error message from attempt to install ever-notedown plugin to Atom 1.2
hyptyposis-2014:lib raymondyee$ apm install ever-notedown
Installing ever-notedown to /Users/raymondyee/.atom/packages ✗
> runas@2.0.0 install /private/var/folders/z8/yvtk3h5n54ldngxxzktb8zh00000gn/T/apm-install-dir-1151013-60758-1w66pue/node_modules/ever-notedown/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild
CXX(target) Release/obj.target/runas/src/main.o
> oniguruma@5.1.2 install /private/var/folders/z8/yvtk3h5n54ldngxxzktb8zh00000gn/T/apm-install-dir-1151013-60758-1w66pue/node_modules/ever-notedown/node_modules/highlights/node_modules/first-mate/node_modules/oniguruma
> node-gyp rebuild
@cs150bf
cs150bf / README.md
Created August 15, 2017 05:56 — forked from MattiSG/README.md
Convert a wiki from MediaWiki to Gollum and Markdown, importing all metadata.

This will convert a wiki from MediaWiki to Gollum and Markdown (or any other format supported by Pandoc).

  1. Install dependencies:

    brew install pandoc icu4c
    gem install --no-ri --no-rdoc hpricot gollum gollum-lib pandoc-ruby
  2. Perform a Special:Export