Skip to content

Instantly share code, notes, and snippets.

@CasperLaiTW
CasperLaiTW / laravel-forge-ngx-pagespeed.sh
Last active July 9, 2024 10:31
Laravel Forge Support NGX_PAGESPEED
PAGESPEED_VERSION=v1.12.34.2-stable
apt-get remove nginx nginx-full -y
apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev -y
sed -i "s/# deb-src/deb-src/" /etc/apt/sources.list.d/nginx-ubuntu-development-xenial.list
apt-get update
apt-get build-dep nginx -y
cd /tmp
apt-get source nginx
@cviebrock
cviebrock / vincenty.sql
Created August 14, 2017 20:56
Vincenty distance formula as a MySQL function
CREATE FUNCTION VINCENTY(
lat1 FLOAT, lon1 FLOAT,
lat2 FLOAT, lon2 FLOAT
) RETURNS FLOAT
NO SQL
DETERMINISTIC
COMMENT 'Returns the distance in degrees on the Earth between two known points
of latitude and longitude using the Vincenty formula from:
http://en.wikipedia.org/wiki/Great-circle_distance'
BEGIN
@jbeda
jbeda / gist:0fb9748db43ecb14f72f8662516a8047
Last active March 8, 2019 20:33
I love `git commit --fixup`
# Have origin be your fork, upstream is upstream.
$ git remote -v
origin git@github.com:jbeda/kubernetes.git (fetch)
origin git@github.com:jbeda/kubernetes.git (push)
upstream git@github.com:kubernetes/kubernetes.git (fetch)
upstream git@github.com:kubernetes/kubernetes.git (push)
# Make some changes to a bunch of files in a multi commit PR
# Find the commit you want to tweak, copy the hash
@alirobe
alirobe / reclaimWindows10.ps1
Last active December 20, 2024 01:00
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@danb-humaan
danb-humaan / UuidModel.php
Created December 3, 2015 10:07
Trait for implementing UUIDs in Laravel models
<?php
namespace App\Traits;
use Rhumsaa\Uuid\Uuid;
use Illuminate\Database\Eloquent\ModelNotFoundException;
/**
* Trait UuidModel
* @package App\Traits
@coilysiren
coilysiren / Hiring.Me.md
Last active October 16, 2015 03:11
Where would I actually like to work? Well I generally follow these rules ~

About Me (not a rule)

These are how I'm appraising places the I'm looking for full time employment. These rules are very specific to me, as a disabled black trans woman. I am not accepting feedback on these rules from anyone except other black trans fem people. Figure out if you / your teams meets the rules before asking me to fill out any sort of application. Feel free to ask me to explain anything here (but like, to explain the facts / wording, NOT explain my reasons for having these rules).

Professionally, I'm a self taught full stack web developer with two years of industry experience, the majority of that experience being with python, team management, and crowdfunding.

guys, dudes, bros

I think you mean team...

I think you mean squad..

I think you mean gang...

I think you mean pals...

@needim
needim / mediaqueries.css
Last active April 4, 2024 23:23
Device Specific CSS Media Queries Collection
/*
Based on:
1. http://stephen.io/mediaqueries
2. https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
*/
/* iPhone X in portrait & landscape */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 812px)
@roachhd
roachhd / README.md
Last active December 12, 2024 12:16
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

Lambda the Ultimate

On page 137 of The Little Schemer, this rather convoluted function appears:

(define multirember&co
  (lambda (a lat col)
    (cond
      ((null? lat)
       (col (quote ()) (quote ())))