Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Building an MVP? | |
# Need a quick database you can set up in seconds? | |
# What about JSON? | |
# | |
# by @levelsio (with help from @marckohlbrugge, @oskarth, @maxdeviant and @kumailht) | |
# JS | |
db=[] | |
fs=require('fs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
// check if customer hash correct | |
loadDbs(array('customers')); | |
$query=$customersDb->prepare("SELECT * FROM customers WHERE secret_hash=:secret_hash"); | |
$query->bindValue(':secret_hash',$_GET['hash']); | |
$query->execute(); | |
$customers=$query->fetchAll(PDO::FETCH_ASSOC); | |
$customer=$customers[0]; | |
if(!empty($customer) && $customers[0]['secret_hash']==$_GET['hash']) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// <readme> | |
/* | |
This is a lite version of Olark's and Intercom's functionality (without the chat part). | |
It lets you get feedback from users on your site to your email. | |
And you won't have to rely on another company anymore! | |
#killyourdependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateSlug() { | |
if( | |
$('.filters .filter.month .choice.active').length>0 && | |
$('.filters .filter.region .choice.active').length>0 | |
) { | |
slug=''; | |
} | |
firstTemperatureDoneAlready=false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this URL and add it as a bookmark, then open Google Maps, go to a place, and click it to open Hoodmaps at the same location | |
# by @marckohlbrugge | |
javascript:(function()%7Bvar%20parts%20%3D%20window.location.href.split(%22%40%22)%5B1%5D.split(%22%2C%22)%3Bwindow.location%20%3D%20%60https%3A%2F%2Fhoodmaps.com%2Findex.php%3Flatitude%3D%24%7Bparts%5B0%5D%7D%26longitude%3D%24%7Bparts%5B1%5D%7D%26zoom%3D%24%7Bparts%5B2%5D.replace(%22z%22%2C%20%22%22)%7D%60%7D)() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// 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')); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |