Skip to content

Instantly share code, notes, and snippets.

View TsaiKoga's full-sized avatar
🎯
Focusing

TsaiKoga TsaiKoga

🎯
Focusing
View GitHub Profile
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@felipesabino
felipesabino / ColorConverter.js
Created March 1, 2013 17:38
Javascript color conversion RGB, CMYK and HSV source from http://www.webtoolkit.info/javascript-color-conversion.html
/**
*
* Javascript color conversion
* http://www.webtoolkit.info/javascript-color-conversion.html
*
**/
function HSV(h, s, v) {
if (h <= 0) { h = 0; }
if (s <= 0) { s = 0; }
@JesseObrien
JesseObrien / gist:7418983
Last active September 26, 2024 12:40
Bind parameters into the SQL query for Laravel ORM
<?php
class MyModel extends Eloquent {
public function getSql()
{
$builder = $this->getBuilder();
$sql = $builder->toSql();
foreach($builder->getBindings() as $binding)
{
@maxivak
maxivak / god.md
Last active April 6, 2021 17:54
God in Rails app
@anton-petrov
anton-petrov / recaptcha.py
Created September 24, 2017 19:11
Solve reCAPTCHA with Selenium + Python
import re, csv
from time import sleep, time
from random import uniform, randint
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException