Skip to content

Instantly share code, notes, and snippets.

(defun gist-lists-retrieved-callback (status)
"Called when the list of gists has been retrieved. Parses the result
and displays the list."
(message "THE CONTENT: %s" (buffer-substring-no-properties (point-min) (point-max)))
(goto-char (point-min))
(search-forward "<?xml")
(let ((gists (gist-xml-cleanup
(xml-parse-region (match-beginning 0) (point-max)))))
(kill-buffer (current-buffer))
(with-current-buffer (get-buffer-create "*gists*")
@mbunkus
mbunkus / gist:1433847
Created December 5, 2011 14:54
debug output of rvm for noclobber problem
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > source /opt/rvm/scripts/rvm
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > export HOME rvm_prefix rvm_user_install_flag rvm_path
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > HOME=/home/mbunkus
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > umask
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > : rvm_stored_umask:002
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > (( 0 == 0 ))
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > rvmrc=/etc/rvmrc
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > [[ -f /etc/rvmrc ]]
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > source /etc/rvmrc
+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > umask g+w
@mbunkus
mbunkus / underflow_fix_try1.diff
Created January 25, 2012 22:15
read buffer underflow fix try #1
diff --git a/src/common/mm_read_buffer_io.cpp b/src/common/mm_read_buffer_io.cpp
index 47cbf09..b7cce2d 100644
--- a/src/common/mm_read_buffer_io.cpp
+++ b/src/common/mm_read_buffer_io.cpp
@@ -88,8 +88,10 @@ mm_read_buffer_io_c::setFilePointer(int64 offset,
// Actual seeking
if (new_pos < 0)
m_proxy_io->setFilePointer(offset, seek_end);
- else
+ else {
diff --git a/src/extract/cues.cpp b/src/extract/cues.cpp
index 1ad56bb..fab2cd3 100644
--- a/src/extract/cues.cpp
+++ b/src/extract/cues.cpp
@@ -77,14 +77,14 @@ write_cues(std::vector<track_spec_t> const &tracks,
static std::map<int64_t, int64_t>
generate_track_number_map(kax_analyzer_c &analyzer) {
- auto tracks_m = analyzer.read_all(EBML_INFO(KaxTracks));
- auto tracks = dynamic_cast<KaxTracks *>(tracks_m.get());
[0 root@bellerophon ~] salt --out=raw '*' grains.item os
{'trinculo.bs.zzzzzzzzz.de': {'os': 'Univention'}}
{'bellerophon.bs.zzzzzzzzz.de': {'os': 'Univention'}}
{'kyushu.bs.zzzzzzzzz.de': {'os': 'Univention'}}
{'lalo.bs.zzzzzzzzz.de': {'os': 'Univention'}}
{'akira.zzzzzzzzz.de': {'os': 'Ubuntu'}}
{'reliant.bs.zzzzzzzzz.de': {'os': 'Ubuntu'}}
{'tkumbra.bs.bs.zzzzzzzzz.de': {'os': 'Ubuntu'}}
{'spector.zzzzzzzzz.de': {'os': 'Ubuntu'}}
{'lakota.zzzzzzzzz.de': {'os': 'CentOS'}}
# Total number of minions registered: 15. Looks good:
[0 root@bellerophon ~] salt --out=raw -C '*' grains.item os|wc -l
15
# Positive matches against the OS work nicely, and their sum equals the number 15 above:
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:Ubuntu' grains.item os|wc -l
9
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:Univention' grains.item os|wc -l
4
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:CentOS' grains.item os|wc -l
1483474769.978240 server started (17965): socket /tmp/tmux-1004/test, protocol 8
1483474769.978260 on Linux 4.8.15.r201612151923-1-grsec #1 SMP PREEMPT Thu Dec 15 20:08:17 EST 2016; libevent 2.0.22-stable (poll)
1483474769.978342 continuing cmdq 0x25e80e0: flags 0, client (nil)
1483474769.978352 cmdq 0x25e80e0: bind-key C-b send-prefix
1483474769.978363 preparing state for bind-key C-b send-prefix (client (nil))
1483474769.978368 cmd_find_client: no target, return (nil)
1483474769.978372 preparing -t state: target none
1483474769.978375 preparing -s state: target none
1483474769.978381 preparing state for bind-key C-b send-prefix (client (nil))
1483474769.978385 cmd_find_client: no target, return (nil)
@mbunkus
mbunkus / fix-1886-try-1.diff
Created February 11, 2017 10:14
potential fix for MKVToolNix issue 1886, try 1
diff --git a/src/common/mpeg4_p10.cpp b/src/common/mpeg4_p10.cpp
index a21edf2ca..923eb1aa2 100644
--- a/src/common/mpeg4_p10.cpp
+++ b/src/common/mpeg4_p10.cpp
@@ -413,7 +413,7 @@ mpeg4::p10::parse_sps(memory_cptr const &buffer,
else {
auto frame_rate = mtx::frame_timing::determine_frame_rate(duration);
if (!frame_rate)
- frame_rate.assign(0x80000000, (duration * 0x80000000) / 1000000000ll);
+ frame_rate.assign(0x80000000ll, (duration * 0x80000000) / 1000000000ll);
[0 mosu@sweet-chili /ftp/pub/rip/mkv/bugs/incoming/sup-delay-not-working-nugzuz] mkvmerge -o without-delay.mkv p_subs.sup
mkvmerge v9.8.0 ('Kuglblids') 64bit
'p_subs.sup': Using the demultiplexer for the format 'PGSSUP'.
'p_subs.sup' track 0: Using the output module for the format 'HDMV PGS'.
The file 'without-delay.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 5 seconds.
[0 mosu@sweet-chili /ftp/pub/rip/mkv/bugs/incoming/sup-delay-not-working-nugzuz] mkvmerge -o with-delay.mkv --sync 0:-413ms '(' p_subs.sup ')'
mkvmerge v9.8.0 ('Kuglblids') 64bit
@mbunkus
mbunkus / tmux-server-19450.log
Created March 8, 2017 14:06
tmux server log
1488981901.306157 server started (19450): version master, socket /tmp/tmux-1000/test, protocol 8
1488981901.306178 on Linux 4.9.10.r201702162016-1-grsec #1 SMP PREEMPT Thu Feb 16 21:13:09 EST 2017; libevent 2.0.22-stable (poll)
1488981901.306760 add peer 0x3eb6120: 8 (0x3eb5930)
1488981901.306781 new client 0x3eb5930
1488981901.306793 loading /etc/tmux.conf
1488981901.306808 loading /dev/null
1488981901.306830 server loop enter
1488981901.306868 peer 0x3eb6120 message 100
1488981901.306876 client 0x3eb5930 IDENTIFY_FLAGS 0x10000
1488981901.306880 peer 0x3eb6120 message 101