I hereby claim:
- I am jgilless on github.
- I am jgilless (https://keybase.io/jgilless) on keybase.
- I have a public key whose fingerprint is 0921 FBAE EC70 C716 6697 13B1 786F 3370 267A 3902
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#simplest autoclicker ever | |
import win32api | |
import win32con | |
import time | |
import sys | |
def click(x,y): | |
win32api.SetCursorPos((x,y)) | |
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) |
# https://projecteuler.net/problem=1 | |
puts "Find the sum of all the multiples of 3 or 5 below which number?" | |
STDOUT.flush #clears the buffer | |
max_num = Integer(gets.chomp) | |
def sum_x3_x5(num) | |
sum = 0 | |
(1..num).each do |n| | |
sum = sum + n if (n % 3 == 0) || (n % 5 == 0) #Add if n is divisible by 3 or 5 |
# https://projecteuler.net/problem=2 | |
puts "Find the sum of even valued Fibonnaci terms which values do not exceed:" | |
STDOUT.flush #clears the buffer | |
num = Integer(gets.chomp) | |
def fibonacci(max_num) | |
fibonacci = [1,2] #first two numbers of the sequence | |
while fibonacci[-2] + fibonacci[-1] < max_num | |
fibonacci << fibonacci[-2] + fibonacci[-1] # next num in sequence |
# https://projecteuler.net/problem=3 | |
puts "Find the largest prime factor of:" | |
STDOUT.flush #clears the buffer | |
max_num = Integer(gets.chomp) | |
def largest_prime_factor(num) | |
largest_factor = 1 | |
#get rid of factors of 2 |
module ApplicationHelper | |
def markdown(text) | |
render_options = { | |
#do not allow any user-inputted HTML in the output. | |
filter_html: true, | |
#do not generate any <img> tags. | |
#no_images: true, | |
#do not generate any <a> tags. | |
#no_links: true, | |
#do not generate any <style> tags. |
Provide a brief overview (~paragraph) of what the use case includes. Roughly equivalent to a user story or an epic.
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "No argument supplied" | |
exit 1 | |
fi | |
mkdir $1 && cd $1 |
const fs = require('fs'); | |
const { execSync } = require('child_process'); | |
if (!process.argv[2]) { | |
console.log('useage: node create-next-app.js <appname>'); | |
process.exit(1); | |
} | |
const rootFolder = process.argv[2]; |
javascript:(function (d) { | |
var tables = d.getElementsByTagName('table'), | |
head = d.head || d.getElementsByTagName('head')[0], | |
styleElement = d.createElement('style'), | |
cssStr = '.table-flip {transition: 1s linear;transform: rotate(360deg);}'; | |
styleElement.type = 'text/css'; | |
styleElement.appendChild(d.createTextNode(cssStr)); | |
head.appendChild(styleElement); | |
function toggleSpin() { | |
var i = 0, |