Skip to content

Instantly share code, notes, and snippets.

View pketh's full-sized avatar
🐢
https://kinopio.club

Pirijan pketh

🐢
https://kinopio.club
View GitHub Profile
@holman
holman / emoji_test.rb
Last active June 18, 2020 01:27
A snapshot of the tests we use internally at GitHub to help edit our blog posts before they go out to everybody. For more information, take a peek at http://zachholman.com/posts/how-github-writes-blog-posts
require_relative "test_helper"
require "open-uri"
require "net/http"
class EmojiTest < Blog::Test
def test_no_emoji
posts.each do |post|
content = File.read(post)
refute_match /:[a-zA-Z0-9_]+:/, content,
@lucamarrocco
lucamarrocco / app.swift
Last active January 30, 2024 11:00
swift osx application without nib
import Cocoa
class WindowController: NSWindowController {
}
class AppDelegate: NSObject {
var mainWindow: NSWindow?
var mainController: NSWindowController?
}
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@harith
harith / shellmarks.sh
Last active September 18, 2022 07:50
Utilities to let you easily reach frequently visited but deeply nested directories.
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
@hasantayyar
hasantayyar / git-dropbox-fix.sh
Created January 9, 2014 10:19
Solution if you are using dropbox and git same time and if you get this error "fatal: Reference has invalid format: refs/heads/master conflicted copy"
find . -type f -name "* conflicted copy*" -exec rm -f {} \;
awk '!/conflicted/' .git/packed-refs > temp && mv temp .git/packed-refs
@joyrexus
joyrexus / README.md
Last active April 14, 2024 14:35 — forked from dergachev/GIF-Screencast-OSX.md
Create a GIF screencast

Convert a screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@robinsloan
robinsloan / gsub-with-hash.rb
Created October 10, 2013 16:37
Didn't know about this.
def doctorize(string)
string.gsub(/M(iste)?r/, 'Mister' => 'Doctor', 'Mr' => 'Dr')
end

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

@njx
njx / remove-widget.html
Created December 18, 2012 23:56
CodeMirror line widget removal bug
<!doctype html>
<html>
<head>
<title>Widget Removal Bug</title>
<link rel="stylesheet" href="lib/codemirror.css">
<script src="lib/codemirror.js"></script>
<link rel="stylesheet" href="doc/docs.css">
<style type="text/css">
.CodeMirror {border: 1px solid black;}
@robinsloan
robinsloan / langoliers.rb
Last active April 7, 2024 13:22
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"