I hereby claim:
- I am dhilipsiva on github.
- I am dhilipsiva (https://keybase.io/dhilipsiva) on keybase.
- I have a public key whose fingerprint is C089 E27F 91EB D68B 75F2 4144 2581 43B7 AA6E 4C40
To claim this, I am signing this object:
/* | |
github.com/dhilipsiva | |
A Simple JavaScript file to AUTO-MINE StackOverflow unicoins: | |
INSTRCTIONS: | |
0. goto stackoverflow.com | |
1. Open your console. | |
2. Copy this code. | |
3. Paste this into cosole |
window.smoothScrollTo = (target_id, duration=1000) -> | |
step = -> | |
factor = (Date.now() - start) / duration # get interpolation factor | |
if factor >= 1 | |
clearInterval timer # stop animation | |
factor = 1 # clip to max 1.0 | |
y = factor * delta + offset | |
window.scrollBy 0, y - window.pageYOffset | |
target = document.getElementById(target_id).offsetTop | |
offset = window.pageYOffset |
from itertools import product | |
nums = [1, 3, 5, 7, 9, 11, 13, 15] | |
expected_num = 30 | |
nums_to_add = 5 | |
for combination in product(nums, repeat=nums_to_add): | |
print combination, " = ", sum(combination) |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyright © 2014 dhilipsiva <dhilipsiva@gmail.com> | |
# | |
# Distributed under terms of the MIT license. | |
""" | |
Requirements: |
1. 2541865828329 | |
2. 3541568428327 | |
3. 2341999999914 |
I hereby claim:
To claim this, I am signing this object:
findPath = (obj, query) -> | |
for k, v of obj | |
if typeof v is "object" | |
path = findPath v, query | |
return "#{k}.#{path}" if path | |
else if v is query | |
return k |
### | |
Badoo spam and like users. | |
Restrictions due to messages limit per day and captchas still cannot be bypassed. :P | |
### | |
getPage = (url) -> | |
$.get url | |
.done (response, success, xhr) -> | |
results = $ response | |
for result in results.find ".user-card" | |
d1 = $ result |
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
typedef enum { | |
UIInterfaceOrientationMaskPortrait = (1 << UIInterfaceOrientationPortrait), | |
UIInterfaceOrientationMaskLandscapeLeft = (1 << UIInterfaceOrientationLandscapeLeft), | |
UIInterfaceOrientationMaskLandscapeRight = (1 << UIInterfaceOrientationLandscapeRight), | |
UIInterfaceOrientationMaskPortraitUpsideDown = (1 << UIInterfaceOrientationPortraitUpsideDown), | |
UIInterfaceOrientationMaskLandscape = | |
(UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight), | |
UIInterfaceOrientationMaskAll = | |
(UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | | |
UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown), |