Skip to content

Instantly share code, notes, and snippets.

@jxcl
jxcl / main.rs
Created February 20, 2015 19:37
Partial Hash Finder
#![feature(rand,core,rustc_private,collections)]
extern crate crypto;
extern crate serialize;
use std::rand;
use std::mem::transmute;
use serialize::hex::ToHex;
use crypto::digest::Digest;
use crypto::sha2::Sha256;
@jxcl
jxcl / conkybar
Created May 27, 2014 01:56
Conky Configuration
background no
out_to_console yes
out_to_x no
update_interval 1
total_run_times 0
short_units yes
pad_percents 2
override_utf8_locale yes
use_spacer left
@jxcl
jxcl / LICENSE
Last active October 28, 2015 15:12
Time Since Last Pacman Sync/Upgrade
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
#!/bin/bash
# Simple script to list version numbers of critical development tools
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
if [ -e /usr/bin/yacc ];
then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
fields_i_care_about = ["f1", "f2"]
new_dict = {}
for field in fields_i_care_about:
new_dict[field] = old_dict[feild]
$ git push origin develop
Counting objects: 47, done.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (25/25), 1.87 KiB, done.
Total 25 (delta 6), reused 22 (delta 3)
error: unable to create temporary sha1 filename ./objects/06: File exists
fatal: failed to write object
error: unpack failed: unpacker exited with error code
To remote/repo
failregex = ^%(__prefix_line)s(?:error: PAM: )?Authentication failure for .* from <HOST>\s*$
^%(__prefix_line)s(?:error: PAM: )?User not known to the underlying authentication module for .* from <HOST>\s*$
^%(__prefix_line)sFailed (?:password|publickey) for .* from <HOST>(?: port \d*)?(?: ssh\d*)?$
^%(__prefix_line)sROOT LOGIN REFUSED.* FROM <HOST>\s*$
^%(__prefix_line)s[iI](?:llegal|nvalid) user .* from <HOST>\s*$
^%(__prefix_line)sUser .+ from <HOST> not allowed because not listed in AllowUsers$
^%(__prefix_line)sUser .+ from <HOST> not allowed because none of user's groups are listed in AllowGroups\s*$
^%(__prefix_line)sauthentication failure; logname=\S* uid=\S* euid=\S* tty=\S* ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$
^%(__prefix_line)srefused connect from \S+ \(<HOST>\)\s*$
^%(__prefix_line)sAddress <HOST> .* POSSIBLE BREAK-IN ATTEMPT\s*$
import socket
import threading
import Queue
import time
def wait_for_connection():
HOST = 'localhost'
PORT = 49999
new_connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
new_connection.bind((HOST, PORT))
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\noindent\textbf{5:}
{\center \[ f(x) = \frac{(x^2 - 8x + 7)}{(x - 6)} \]}
\includegraphics[width=5in,height=3.1in]{question5.pdf}
\noindent\emph{The Asymptotes:}
def validate_word(self, word, board):
for x in range(len(board.board)):
for y in range(len(board.board[x])):
if board.board[x][y] == char:
if self.recursive_word_is_valid(word, board, (x, y)):
return True
return False