Skip to content

Instantly share code, notes, and snippets.

View manlikeangus's full-sized avatar
🤝
Doing things that come naturally

Angus manlikeangus

🤝
Doing things that come naturally
  • Earth
View GitHub Profile
@manlikeangus
manlikeangus / strtotitle.php
Created November 9, 2022 21:51
Title Case in PHP
<?php
/**
* Converts the input `$title` into the Title Case as specified by the American Psychological Association (APA)
* https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case
*
* Expands on the function originally written by Thomas Rutter
* https://www.sitepoint.com/title-case-in-php/
*
* @param string $title The title string to convert
*
@manlikeangus
manlikeangus / instagram-follow-unfollow.js
Created October 25, 2022 02:43 — forked from dongarchive/instagram-follow-unfollow.js
Follow and unfollow instagram script - ApplyBoard
// -------------------
// To mass follow
// -------------------
// 1. Open instagram page (eg. https://www.instagram.com/visatoronto/) utilizing google chrome
// 2. Click 'xxx followers' on instagram page, this will open up a modal containing user's followers
// 3. Open google chrome developer tools by either (1) right clicking on the screen and clicking 'inspect'
// OR (2) Command + Option + J
// 4. Click on the 'console' method in dev tools
// 5. First paste the following code to instantiate jquery and press enter
@manlikeangus
manlikeangus / workbench-darkmode-fix-macosx.sh
Last active January 23, 2020 22:57
Disable Mac OS Dark Mode in MySQL Workbench
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "MySQL Workbench fixed successfully. Restart application"
@manlikeangus
manlikeangus / .htaccess
Created July 2, 2017 22:13 — forked from ludo237/.htaccess
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
@manlikeangus
manlikeangus / Credit Card Generator
Created April 28, 2017 03:36 — forked from B-Con/Credit Card Generator
This JavaScript function generates random number strings that pass the Luhn checksum, the test that credit card numbers must conform to. It assumes there is an HTML radio input to indicate which company issued the card. This code is from my webpage here: http://bradconte.com/cc_generator.html.
// Copyright (c) 2015, Brad Conte (http://bradconte.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.