Skip to content

Instantly share code, notes, and snippets.

@bobquest33
bobquest33 / set_in_tz.yml
Last active October 7, 2019 18:11
Ansible Playbook for setting and checking if time reflects based on timezone
- hosts: raspi
become: yes
vars:
timezone_zone: Asia/Kolkata # valid tz database string
roles:
- role: anxs.timezone
post_tasks:
- name: get current time
shell: date
register: tz_op
@bobquest33
bobquest33 / websearch.ipynb
Created October 18, 2018 03:57
Shows how to do Google Search with Python search library
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// npm install eth-crypto --save
// node
// es6
// import EthCrypto from 'eth-crypto';
const EthCrypto = require('eth-crypto');
const solc = require('solc');
// create compiled solidity-code
const compiled = solc.compile(
'contract ExampleContract {...',
// Copyright 2017 https://tokenmarket.net - MIT licensed
//
// Run with Node 7.x as:
//
// node --harmony-async-await deploy.js
//
let fs = require("fs");
let Web3 = require('web3'); // https://www.npmjs.com/package/web3
@bobquest33
bobquest33 / fabfile.py
Created October 18, 2017 08:43
Script for Accessing Tor from Windows PC
from fabric.api import *
def query():
run("ls /")
@bobquest33
bobquest33 / fabfile.py
Last active October 18, 2017 08:23
fabfile to setup ssh in remote server
from fabric.api import *
from fabtools import require
import fabtools
import os
import traceback
@task
def setup_tor_ssh():
require.deb.uptodate_index(quiet=True)
# Require tor Debian/Ubuntu packages
@bobquest33
bobquest33 / dispatch.py
Created July 18, 2017 17:59 — forked from aortbals/dispatch.py
Synchronize two folders using python.
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
@bobquest33
bobquest33 / feedfinder.py
Created July 18, 2017 07:13 — forked from Querela/feedfinder.py
[python][html][feed][rss] feed finder from url
#!/usr/local/bin/python3
#
# feedfinder.py
#
# Utils for finding feeds
#
import sys
from datetime import datetime
@bobquest33
bobquest33 / pyget2.py
Created June 22, 2017 11:13 — forked from benhutchins/pyget2.py
A python download accelerator
#!/usr/bin/env python
#
# pyget2.py
# A python download accelerator
#
# This file uses multiprocessing along with
# chunked/parallel downloading to speed up
# the download of files (if possible).
#
# @author Benjamin Hutchins
@bobquest33
bobquest33 / gmail_imap_dump_eml.py
Created June 6, 2017 06:54 — forked from robulouski/gmail_imap_dump_eml.py
Very simple Python script to dump all emails in an IMAP folder to files.
#!/usr/bin/env python
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
#
import sys
import imaplib
import getpass