Skip to content

Instantly share code, notes, and snippets.

View levelsio's full-sized avatar

levelsio levelsio

View GitHub Profile
/* <type text simulation> */
var currentSampleJob=sampleJobs[0];
var autoTypingActive=true;
var transitionDelayTime=0;
var sampleJobLength=0;
var typingNow=false;
var sampleJobTimer=0;
var timer=null;
var searchElement = $('.search');
@levelsio
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@levelsio
levelsio / windows_keys_like_osx.ahk
Last active November 12, 2019 10:08
Make Bootcamp Windows keys act like OSX
; Make Bootcamp Windows keys act like OSX
; by @levelsio
;
; 2017-11-02
;
; Licensed as GPL
;
; Use autohotkey.com to load this file on Windows
;
; This fixes Cmd+Tab to work like Alt+Tab, also keys like Cmd+C as Ctrl+C etc., Cmd+Q to Alt-F4
@levelsio
levelsio / makebook_obfuscate.php
Last active April 13, 2024 12:01
Obfuscate your ebook so that people who didn't pay can read it, partly
<?php
/*
I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it.
It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though.
It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function.
You should check if user paid for book or not, then either run ob_start or not!
/*
code to match for dating
these are BOOLEAN values
match_gender = the gender of the user itself
match_target_gender = the gender of the target user
if match_gender_male = true it means the user is a male
if match_target_gender_male = true it means the user is looking for a male
@levelsio
levelsio / levelsio-by.html
Last active March 10, 2021 05:20
Maker Link (aka the @levelsio by link)
<!-- Maker Link by @levelsio -->
<!-- MIT License -->
<style>
body {
background:#333;
}
.levelsio-by {
font-family:"Helvetica Neue",sans-serif;
right:0;
<?
// this bot tries to match chat messages to previous forum posts and links to them
require_once(__DIR__.'/../app/config.php');
require_once(__DIR__.'/../app/functions.php');
loadDbs(array('users_global','messages','questions'));
@levelsio
levelsio / Is it now Ramadan.php
Last active June 6, 2018 01:58
"Is it now Ramadan?" function in PHP
# by @levelsio
#
# MIT licensed
#
# make sure you enable php_intl on PHP
# you can do by uncommenting ;extension=intl or ;extension=php_intl
# and installing php-intl, e.g. sudo apt-get install php-intl
#
# made for Nomad List to give people a notice if they go to a place
# where it is currently Ramadan
<?
// this script receives a Stripe dispute / chargeback and:
//
// - immediately refunds the payment
// - closes the user's account (in my DB, add your own code there)
//
// this is to automate dispute handling (because you never win a dispute on Stripe anyway)
// and by refunding avoiding the chargeback fee
//
@levelsio
levelsio / malaysia_singapore.geojson
Last active December 13, 2018 18:30
Singapore + Malaysia country borders in GeoJSON because most are missing Singapore!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.