Skip to content

Instantly share code, notes, and snippets.

@sirneb
sirneb / upgrade-guide.txt
Last active May 29, 2019 19:18
5/25/2019 Athens Upgrade Full Guide
// This builds off the setup here: https://gist.github.com/sirneb/8419e41aea4f2d5770555301006cea20
// This is upgrade storage version (node won't start otherwise) AND convert from archive mode to full mode with a fairly recent snapshot
Step 1: Update the docker-compose.yml from above to include "upgrader" and "importer" service. For this guide, you
will need to update the <LOCAL_PATH_TO_SNAPSHOT_FILE> line to:
"- /home/<USERNAME>/mainnet-BLy4Y4M1LtPJRDaiM1QRQog1a7HRfns2J6HKCFacwLBYMUFCG6P.full:/snapshot"
(Remember to change <USERNAME>)
Example:
// docker-compose.yml
@sirneb
sirneb / docker-compose.yml
Created September 18, 2018 05:22
Tezos mainnet docker compose
version: "2"
services:
node:
image: tezos/tezos:mainnet
hostname: node
command: tezos-node
ports:
- "8732:8732"
- "9732:9732"
# -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
#
# This plugin adds the ability to toggle full screen mode.
#
# Modified to hide menu bar when in fullscreen mode (Glutanimate, 2016)
#
from aqt import mw
from PyQt4.QtGui import *
class FieldsLoader():
def import(self):
return 'nothing'
var SCRIPT_NAME = 'Broken Url Checker';
var LOG_LEVEL = 'error'; //change this to debug if you want more logging
var NOTIFY = ['sdao@propelmarketing.com'];
var SPREADSHEET_PREFIX = 'Broken Url Details'; // A timestamp is appended
var NOTIFY_ON_ERROR = ['sdao@propelmarketing.com'];
var STRIP_QUERY_STRING = true; //Drop everything after the ? in the url to speed things up
var REPORT_ON_REDIRECTS = true; //If you want to be able to track 301s and 302, turn this on
var VALID_RESPONSE_CODES = [200,301,302];
var URLS_CHECKED_FILE_NAME = 'UrlsAlreadyChecked-'+AdWordsApp.currentAccount().getCustomerId()+'.json';
var DONE_LABEL_PREFIX = 'All Urls Checked - ';
$('#counties').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{
"aTargets":[3],
"fnCreatedCell": function(nTd, sData, oData, iRow, iCol)
def some_method
fields_of_interest = %w{time date number_of_guests}
modified = self.changes.keep_if do |key, value|
keep_or_not = false
fields_of_interest.each { |field| keep_or_not = true if field == key }
keep_or_not
end
modified.do_something
$('div.toc a').bind('click', function(event) {
go_to_top();
$.get($(this).attr("href"), $(this).serialize(), null, "script");
if ( history.pushState ){ // trying to use this clause to check pushState compability
event.preventDefault();
history.pushState(null, "", this.href); // pushes the URL to link bar
}
return false;
def show
@content = find_content
@title = book_title # just a string
@comment = Comment.new
# @comments_feed = @content.comments
@contents_path = make_content_path(@content) # creates location path view
@sections = Node.get_top_list # table of contents view
@node = @content.node
--- /home/rafal/Development/gmate-gmate-9c855f8/plugins/gemini.py 2011-02-01 16:25:19.312728001 +0100
+++ gemini.py 2011-02-01 20:42:58.106625001 +0100
@@ -54,17 +54,11 @@
end_keyvals = [34, 39, 96, 41, 93, 125]
twin_start = ['"',"'",'`','(','[','{']
twin_end = ['"',"'",'`',')',']','}']
- toggle = False
def __init__(self):
return