Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Rudy Affandi lesaff

🎯
Focusing
View GitHub Profile
@aarongerig
aarongerig / example.html
Created Feb 6, 2020
UIkit Google Maps component
View example.html
<div
class="uk-card uk-card-default uk-card-bordered uk-height-large uk-margin"
data-uk-maps="{{ google_browser_api_key() }}"
data-locations='{{ mapsLocations|json_encode }}'
data-zoom-control="true"
data-zoom="15"
data-map-type-control="true"
></div>
@sandren
sandren / tailwind.md
Last active Feb 10, 2021
Tailwind CSS best practices
View tailwind.md

Tailwind CSS best practices

Utility classes

  1. When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!

  2. Always use fewer utility classes when possible. For example, use mx-2 instead of ml-2 mr-2 and don't be afraid to use the simpler p-4 lg:pt-8 instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4.

  3. Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center instead of block lg:flex flex-col justify-center to make it very clear that the flexbox utilities are only applicable at the

@maietta
maietta / command.txt
Last active Apr 22, 2019
PowerDNS on Ubuntu 18.04+
View command.txt
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
sudo ls -lh /etc/resolv.conf
sudo rm /etc/resolv.conf
sudo echo "nameserver 1.1.1.1" > /etc/resolv.conf
sudo apt-get update
sudo apt-get install pdns-server pdns-backend-mysql
@Revod
Revod / Material Theme.itermcolors
Created Nov 6, 2016
Material Theme For iTerm2
View Material Theme.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Blue Component</key>
<real>0.25882352941176473</real>
@tao
tao / gist:fba880299bdfdcfd491582724ede9dd7
Last active Dec 1, 2020
Using Passport with Laravel Spark
View gist:fba880299bdfdcfd491582724ede9dd7
# Installation
As far as I know this is how to get Passport on Laravel Spark working correctly, it works so far for me over the API but there might be something I am still missing.
I am using the following software versions in composer.json:
```
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
@davebarnwell
davebarnwell / brew-dnsmasq.md
Last active Dec 17, 2020
install dnsmasq with brew
View brew-dnsmasq.md

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
@bishboria
bishboria / springer-free-maths-books.md
Last active Feb 7, 2021
Springer made a bunch of books available for free, these were the direct links
View gist:122907e95956602e5c09
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@jasonvarga
jasonvarga / _readme.md
Last active Aug 29, 2015
Restricting an account to specific sections in the CP
View _readme.md

Simple Statamic CP edit restrictions

  • Add the hooks file to _add-ons/restrict_to/hooks.restrict_to.php.
  • Add the restrict_to tags field to your _config/bundles/member/fields.yaml.
  • To restrict pages, add them to the restrict_to field. eg. /blog, /calendar. They will only be allowed to edit pages that begin with this url.

Warning

If your member listing is visible, (it is by default), they can edit their own restricted pages.

@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
View delete_all_object_versions.sh
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`