Skip to content

Instantly share code, notes, and snippets.

@fadelakin
fadelakin / tmux.conf
Created November 7, 2017 06:54
my tmux conf file
#####
# Instructions
####
# BE SURE TO INSTALL TMUX Plugin Manager
# https://github.com/tmux-plugins/tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# then Load tmux configurations
#> tmux source-file ~/.tmux.conf
@fadelakin
fadelakin / blur.java
Created May 12, 2015 18:28
blurring bitmaps in android using renderscript
// blurring with renderscript requires API 17 and above
private Bitmap blurBitmap(Bitmap bitmap) {
//Let's create an empty bitmap with the same size of the bitmap we want to blur
Bitmap outBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
//Instantiate a new Renderscript
RenderScript rs = RenderScript.create(getApplicationContext());
//Create an Intrinsic Blur Script using the Renderscript
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
@fadelakin
fadelakin / my_fh_app.py
Created November 8, 2014 02:42
Fancy Hands API Demo for CodeDay
from fancyhands import FancyhandsClient
from datetime import datetime, timedelta # (We'll need this later)
api_kay = '<YOUR KEY>'
secret = '<YOUR SECRET>'
client = FancyhandsClient(api_kay, secret);
#client.standard_create(
# title="Let me know what's new on the internet!",
@fadelakin
fadelakin / keybase.md
Created March 29, 2014 20:21
keybase.io

Keybase proof

I hereby claim:

  • I am fadelakin on github.
  • I am fisher (https://keybase.io/fisher) on keybase.
  • I have a public key whose fingerprint is BD4D 610A 6269 73DF EEE1 D20A C478 1C00 3D8E 5EB3

To claim this, I am signing this object:

@fadelakin
fadelakin / ruby_copy_script.rb
Created October 27, 2013 16:17
Ruby script to copy one file to another
# ruby script to copy one file to another.
from_file, to_file = ARGV
script = $0
puts "Copying from #{from_file} to #{to_file}"
# we could do these two on one line too, how?
input = File.open(from_file)
indata = input.read()
@fadelakin
fadelakin / average.clj
Created October 19, 2013 17:09
A function that calculates the average of some numbers in Clojure
(defn average
[numbers]
(/ (apply + numbers) (count numbers)))
@fadelakin
fadelakin / tictactoe.rb
Created October 18, 2013 13:33
Tic Tac Toe in Ruby.
# Tic Tac Toe
# Temidayo Fisher Adelakin
#!/usr/bin/env ruby
class TicTacToe
def initialize
# Container to hold the 9 places on the tic tac toe board
# 3 x 3 grid. A,B,C across, 1,2,3 down
@fadelakin
fadelakin / codeBot.js
Last active December 25, 2015 20:39 — forked from AndrewCraswell/codeBot.js
Simple bot for CoderClicker: http://coderclicker.meteor.com/ for when you have lots and lots of money only. Not for when starting out. How to use: Paste the following into the JavaScript console in your browser and run it. To start the bot type: "CodeBot.start();" to stop it do: "CodeBot.stop();" (or just reload the page). This gist was fashione…
CodeBot = {
start: function() {
this.clickInterval = setInterval(function(){
// Click the code button fast as possible!
$(".code.btn").click();
}, 1);
this.buyInterval = setInterval(function(){
// Try to buy items as fast as possible, starting with more expensive ones
// NOTE: We have fallbacks because we will start earning money too fast to rely on only buying Monkeys
$("#50000000000").click();