Skip to content

Instantly share code, notes, and snippets.

var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance
stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08
maxWait = 500, // In milliseconds
stopped = false,
stopBefore = 1; // In minutes for timer before stopping redirect on webpage
var $loButton = $('#double_your_btc_bet_lo_button'),
$hiButton = $('#double_your_btc_bet_hi_button');
var startValue = '0.038000001', // Don't lower the decimal point more than 4x of current balance
stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08
maxWait = 500, // In milliseconds
stopped = false,
stopBefore = 3; // In minutes
var $loButton = $('#double_your_doge_bet_lo_button'),
$hiButton = $('#double_your_doge_bet_hi_button');
@maxhis
maxhis / IAPHelper.swift
Created October 9, 2017 09:10
[iOS In App Purchase Helper] #swift #in_app_purchase
//
// IAPHelper.swift
// Bandwagon
//
// Created by Andy on 2017/9/27.
// Copyright © 2017年 Doraemon. All rights reserved.
//
import Foundation
import SwiftyStoreKit
@maxhis
maxhis / Swift extension to NSMutableAttributedString (highlight and replace)
Last active February 23, 2016 08:24 — forked from sketchytech/Swift extension to NSMutableAttributedString (highlight and replace)
Swift extension to NSMutableAttributedString adding methods for highlighting and replacing substrings (swift 2.0 supportted)
extension NSMutableAttributedString {
func highlightStrings(stringToHighlight:String, usingRegex:Bool = false) {
var useRegex:NSRegularExpressionOptions?
if !usingRegex {
useRegex = NSRegularExpressionOptions.IgnoreMetacharacters
}
+(UIImage*)imageWithImage: (UIImage*) sourceImage scaledToWidth: (float) i_width
{
float oldWidth = sourceImage.size.width;
float scaleFactor = i_width / oldWidth;
float newHeight = sourceImage.size.height * scaleFactor;
float newWidth = oldWidth * scaleFactor;
UIGraphicsBeginImageContext(CGSizeMake(newWidth, newHeight));
[sourceImage drawInRect:CGRectMake(0, 0, newWidth, newHeight)];
boolean isDebuggable = ( 0 != ( getApplcationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );
@maxhis
maxhis / VerticalSeekBar.java
Last active December 12, 2015 07:48
VerticalSeekBar for Android
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.SeekBar;
public class VerticalSeekBar extends SeekBar {
private OnSeekBarChangeListener myListener;