Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / rpibackup.sh
Created October 28, 2015 06:16 — forked from arpanpal010/rpibackup.sh
Backup files from remote pc to a single location in storage (preserves relative paths).
#!/bin/bash
#this script backs up files from various locations in a remote computer.
#using scp to SFTP the files from remote.
#files are stored as they are to / in $backupdir (hierarchy preserved), either specify absolute path for backupdir, or use $rootdir as a container
#in future this script will be run as a cronjob
#have to provide password everytime, TODO setup keys (although this has nothing to do with the script)
#usage: files that are to be backed up from pi (mainly configs and server settings)
@Teino1978-Corp
Teino1978-Corp / getter_media.sh
Created October 28, 2015 06:18 — forked from arpanpal010/getter_media.sh
script for gathering movie_ids, name_ids and character_ids from the mothership.
#!/bin/bash
#script for scraping movie IDs and name ids from IMDb. This script recusively crawls IMDb pages and extracts related movie/people/character ids and stores them in txt files.
#USAGE: -getid => gets movie ids into list_(imdb|name|character)_id.txt
# -getinfo=> gets data(XML/JSON/JSONP) and puts in store_data
# -print => prints current id/info status
#
#Added functionality to get data from omdbapi in JSON/XML format. Tweak custom URL according to need.
#Added functionality to get data from myapifilms in JSON/XML/JSONP format. Tweak custom URL according to need.
#CAUTION: DON'T RUN -getid and -getinfo together in same argument rather use separate windows!!
########################################################################
@Teino1978-Corp
Teino1978-Corp / linkthedots.sh
Created October 28, 2015 06:27 — forked from arpanpal010/linkthedots.sh
copy dot files from various locations to a single folder for backup.
#!/bin/bash
#script to copy the dotfiles to/from here to/from their proper places
#added file structure preservation - files are copied to their location related to root
#added logging errors
#to clone/sync my dotfiles: git clone https://github.com/arpanpal010/dotfiles.git
#Usage:
#$ sh linkthedots.sh collect --> get files
@Teino1978-Corp
Teino1978-Corp / deduplicate.py
Created October 28, 2015 06:30 — forked from arpanpal010/deduplicate.py
Duplicate mover/remover based on file hashes.
#!/usr/bin/python
from __future__ import print_function
import sys, hashlib, os, shutil, time
from collections import Counter
#function to remove duplicates in folder by genrating and comparing their hash values
#has option to remove file automatically or move them to a separate place.
@Teino1978-Corp
Teino1978-Corp / proposal.md
Created October 28, 2015 15:10 — forked from stuartpb/proposal.md
A proposal for a Generalized Hashcash Format

Generalized Hashcash Header

History

Proposal goals

  • Enable some degree of modularity and interoperability for hashcash library components.
  • Specify hashcash patterns for domains beyond email.
  • Allow individual components, such as the hashing function, to change without breaking orthogonal components, such as calculation and valuation.
@Teino1978-Corp
Teino1978-Corp / README.md
Created October 28, 2015 15:34 — forked from jharding/README.md
Help beta test typeahead.js v0.10.0! Please direct all feedback here: https://github.com/twitter/typeahead.js/pull/335

build status

[typeahead.js][gh-page]

Inspired by [twitter.com]'s autocomplete search functionality, typeahead.js is a flexible JavaScript library that provides a strong foundation for building robust typeaheads.

The typeahead.js library is built on top of 2 components: the data component,

@Teino1978-Corp
Teino1978-Corp / amt.cpp
Created October 28, 2015 15:47 — forked from chitreshkakwani/amt.cpp
Array Mapped Trie design
// Store all the levels in separate tables
/* Level 1 - 0000100001 | 0
Level 2 - 0000101100 | 2
0110000000 | 0
Level 3 - 0000100010 | 7
0000100010 | 5
0000100010 | 3
#cloud-config
write_files:
- path: /etc/aws.conf
owner: root
content: |
[Global]
- path: /opt/bin/consume-tokens.sh
owner: root
permissions: 0755
@Teino1978-Corp
Teino1978-Corp / ANTNewsBot.xml
Created October 29, 2015 03:02 — forked from HerbertV/ANTNewsBot.xml
A prove of concept! Create and manage simple news pages with Ant.
<!--
===========================================================================
ANT News Bot
===========================================================================
Sample files are provided below.
Folder structure:
/
/ant
/ant/ant-contrib (external ant lib)
@Teino1978-Corp
Teino1978-Corp / gist:298edd57fce33904c238
Last active October 29, 2015 07:04 — forked from webchick/gist:956a2d7a49c7490fefb5
Most popular D7 modules (as of July 16, 2015)
SELECT n.title, SUM(w.count) as total
FROM project_usage_week_release w
INNER JOIN field_data_field_release_project r ON w.nid = r.entity_id
INNER JOIN node n ON n.nid = r.field_release_project_target_id
INNER JOIN
field_data_field_release_version v ON v.entity_id = r.entity_id
WHERE LEFT(v.field_release_version_value, 3) = '7.x'
AND FROM_UNIXTIME(w.timestamp) BETWEEN CURDATE()-INTERVAL 2 WEEK AND CURDATE()
GROUP BY n.title
ORDER BY total DESC;