Skip to content

Instantly share code, notes, and snippets.

View ajmalafif's full-sized avatar
💻

Ajmal Afif ajmalafif

💻
View GitHub Profile
#MAIN_1 {
box-sizing: border-box;
color: rgb(4, 4, 2);
cursor: default;
display: flex;
height: 2526.08px;
max-width: 100%;
text-decoration: none solid rgb(4, 4, 2);
text-size-adjust: 100%;
width: 960px;
@ajmalafif
ajmalafif / .travis.sync-s3.yml
Created January 17, 2018 06:43 — forked from benjamincharity/.travis.sync-s3.yml
Set up TravisCI to sync an S3 bucket.
" Two env variables must be added to TravisCI settings:
" AWS_SECRET_ACCESS_KEY
" AWS_ACCESS_KEY_ID
before_deploy:
pip install --user awscli
deploy:
provider: script
script: ~/.local/bin/aws s3 sync dist s3://MY_BUCKET_NAME --region=us-west-2 --delete
skip_cleanup: true
@ajmalafif
ajmalafif / font-loader.js
Created January 7, 2018 06:15 — forked from DavidWells/font-loader.js
Adding Font Face observer to your site
import FontFaceObserver from './fontfaceobserver'
;(function (w) {
// if the class is already set, we're good.
if (w.document.documentElement.className.indexOf('fonts-loaded') > -1) {
return
}
var openSansFont = new w.FontFaceObserver('Open Sans', {
weight: 200
})

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@ajmalafif
ajmalafif / sites-available-ghost
Created December 23, 2017 19:01 — forked from robotnealan/sites-available-ghost
DigitalOcean LetsEncrypt Nginx Config
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
location ~ ^/.well-known {
root /var/www/ghost;
}
location / {
return 301 https://$server_name$request_uri;
@ajmalafif
ajmalafif / README.markdown
Created December 21, 2017 02:50 — forked from code-later/README.markdown
Export your Octopress files to Ghost

This is a very rough script to export your octopress files to Ghost. You will still need to check your data but it will give you a head start. Feel free to fork and optimize the script for your purpose.

The following should be considered:

  1. You need to execute the script in the source/_posts directory
  2. You need to manually copy all the images to /var/www/ghost/content/images
  3. Images with external URLs are not handled
  4. Blockquotes have their issues
  5. Lists are not exported correctly
@ajmalafif
ajmalafif / camphor.scss
Created December 17, 2017 15:46 — forked from bdno86/camphor.scss
camphor
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE
{
"name": "Typography",
"settings": [
{
"type": "header",
"content": "Headings and buttons"
},
{
"type": "select",
"id": "type_header_family",
{% if settings.type_base_family contains 'Google' %}
{%- assign type_base_parts = settings.type_base_family | split: '_' -%}
{% capture baseGoogleUrl %}{{ type_base_parts[1] }}:400,700{% endcapture %}
{{ '//fonts.googleapis.com/css?family=' | append: baseGoogleUrl | stylesheet_tag }}
{% endif %}
{% if settings.type_header_family contains 'Google' %}
{% unless settings.type_header_family contains type_base_parts[1] and settings.type_header_family contains '700' %}
{%- assign type_header_parts = settings.type_header_family | split: '_' -%}
{% capture headerGoogleUrl %}{{ type_header_parts[1] }}:{{ type_header_parts[2] }}{% endcapture %}
{{ '//fonts.googleapis.com/css?family=' | append: headerGoogleUrl | stylesheet_tag }}

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style