Skip to content

Instantly share code, notes, and snippets.

View FrankFonts's full-sized avatar
🏠
Working from home

Frank Fonts FrankFonts

🏠
Working from home
View GitHub Profile
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@Seasons7
Seasons7 / nstask.swift
Created July 22, 2015 19:21
NSTask Sample for Swift
import Cocoa
import Foundation
var str = "Hello, playground"
var task:NSTask = NSTask()
var pipe:NSPipe = NSPipe()
task.launchPath = "/bin/ls"
task.arguments = ["-la"]
@typemytype
typemytype / pinkyfier.py
Last active August 29, 2015 14:12
creates a pink app icon
from AppKit import *
icon = NSApp().applicationIconImage()
w, h = icon.size()
new = NSImage.alloc().initWithSize_((w, h))
imageRect = NSMakeRect(0, 0, w, h)
new.lockFocus()
@xero
xero / base64font.php
Created June 5, 2013 16:04
an example of base64 encoding fonts for use on the web. this is just a POC, your base64 encoded data should be cached and saved on the server, not generated at run/request time. so i suppose this is more of a syntax/workflow example.
<html>
<head>
<title>base64 encoded webfonts example</title>
<?php
$file = "webfont.eot";
$handle = fopen($filename, "r");
$data = fread(fopen($file, "r"), filesize($file));
?>
<style>
@font-face {
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>