This file contains hidden or 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
require 'net/http' | |
require 'uri' | |
uri = URI.parse('http://www.test.com/index.php') | |
http = Net::HTTP.new(uri.host, uri.port) | |
hex = (('a'..'f').to_a + ('0'..'9').to_a).sort.map { |x| x.ord } | |
ascii = (32..127).to_a | |
tables = '' |
This file contains hidden or 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
require 'nokogiri' | |
require 'base64' | |
require 'csv' | |
file = File.new("1password.csv", "w") | |
f = File.open(ARGV[0]) | |
doc = Nokogiri::XML(f) | |
f.close |
This file contains hidden or 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
import httplib | |
import urllib | |
import re | |
password = "" | |
md5 = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'] | |
cpt = 0 | |
i = 1 |
This file contains hidden or 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
Mappings: | |
CWLogs: | |
CakeErrorLogGroup: | |
LogFile: "/var/www/html/project/tmp/logs/error.log" | |
TimestampFormat: "%m-%d-%Y %H:%M:%S" | |
FilterPatterns: | |
AllCakeErrorsFilter: "[timestamp, type = *Error*, ...]" | |
Outputs: |
This file contains hidden or 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
import os, re, requests | |
rootdir = '_posts' | |
for subdir, dirs, files in os.walk(rootdir): | |
for file in files: | |
filename = os.path.join(subdir, file) | |
print filename | |
f = open(filename, "r") |
This file contains hidden or 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
<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet type='text/xsl' href='http://timesofindia.feedsportal.com/xsl/eng/rss.xsl'?> | |
<rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><atom:link href="http://timesofindia.indiatimes.com/rssfeeds/1221656.cms" rel="self" type="application/rss+xml" /><title>Top Headlines - The Times of India</title><link>http://timesofindia.indiatimes.com/articlelist/1221656.cms</link><description>Times of India brings the Latest & Top Breaking News on Politics and Current Affairs in India & around the World, Cricket, Sports, Business, Bollywood News and Entertainment, Science, Technology, Health & Fitness news & opinions from leading columnists.</description><language>en-gb</language><copyright>Copyright:(C) 2016 Bennett Coleman & Co |
This file contains hidden or 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
require 'http' | |
require 'nokogiri' | |
File.open('urls.txt', 'r') do |file_handle| | |
file_handle.each_line do |line| | |
begin | |
html = HTTP.get(line).to_s | |
doc = Nokogiri::HTML(html) | |
href = doc.xpath('//*[@id="stp-sidebar"]/div/div[1]/div[1]/a/@href') | |
if href.to_s == '' |
This file contains hidden or 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
require 'octokit' | |
Octokit.auto_paginate = true | |
Octokit.org_repositories('github').each do | repo | | |
puts repo.name | |
end |
This file contains hidden or 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
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.githubusercontent.com/Techbrunch/909796994aadd92b5f2be66c488d6eb6/raw/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
This file contains hidden or 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
#!/bin/sh | |
# From - http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# - https://github.com/saxenap/install-redis-amazon-linux-centos/blob/master/redis-server | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# Originally from - https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server |
OlderNewer