- Public URL
- Status
Incomplete
- Last Updated
2018-08-23 04:10 EDT
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
" ACEJUMP | |
" Based on emacs' AceJump feature (http://www.emacswiki.org/emacs/AceJump). | |
" AceJump based on these Vim plugins: | |
" EasyMotion (http://www.vim.org/scripts/script.php?script_id=3526) | |
" PreciseJump (http://www.vim.org/scripts/script.php?script_id=3437) | |
" Type AJ mapping, followed by a lower or uppercase letter. | |
" All words on the screen starting with that letter will have | |
" their first letters replaced with a sequential character. | |
" Type this character to jump to that word. |
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
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
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
-- copy.lua | |
-- | |
-- Lua functions of varying complexity to deep copy tables. | |
-- | |
-- 1. The Problem. | |
-- | |
-- Here's an example to see why deep copies are useful. Let's | |
-- say function f receives a table parameter t, and it wants to |
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 python | |
# -*- coding: utf-8 -*- | |
# run this in the directory ~/.config/quassel-irc.org/ | |
import sqlite3 | |
import time | |
con = sqlite3.connect('quassel-storage.sqlite') | |
with con: |
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
#include <cassert> | |
#include <memory> // std::addressof | |
template<typename ResourceTag, typename ResourceType> class Resource { | |
public: | |
Resource() noexcept = default; | |
explicit Resource(ResourceType resource) noexcept : resource_{ resource } {} | |
Resource(const Resource&) = delete; | |
Resource& operator=(const Resource&) = delete; |
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 python | |
""" | |
Twitter's API doesn't allow you to get replies to a particular tweet. Strange | |
but true. But you can use Twitter's Search API to search for tweets that are | |
directed at a particular user, and then search through the results to see if | |
any are replies to a given tweet. You probably are also interested in the | |
replies to any replies as well, so the process is recursive. The big caveat | |
here is that the search API only returns results for the last 7 days. So |
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
#include "colattachedtype.h" | |
#include <QQuickItem> | |
#include <QQuickWindow> | |
#include <QQmlInfo> | |
ColAttachedType::ColAttachedType(QObject* parent) : | |
QObject{parent}, | |
m_item{qobject_cast<QQuickItem*>(parent)} | |
{ | |
if (!m_item) { |
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
#include <cstdio> | |
#include <random> | |
#include <algorithm> | |
#include <chrono> | |
int getRandNum_Old() { | |
static bool init = false; | |
if (!init) { | |
std::srand(time(nullptr)); // Seed std::rand | |
init = true; |
OlderNewer