Skip to content

Instantly share code, notes, and snippets.

@brackendev
brackendev / clean_flutter_project.sh
Created December 15, 2021 21:30
Clean Flutter project
#!/bin/sh
rm -rf .dart_tool
rm -rf build
rm -rf ~/.gradle
rm -rf .gradle
rm -rf android/.gradle
rm -f pubspec.lock
flutter clean
@brackendev
brackendev / xlm_validate.py
Created March 4, 2021 18:02
Validate XML file
#!/usr/bin/env python3
from xml.sax.handler import ContentHandler
from xml.sax import make_parser
from glob import glob
import sys
def parsefile(file):
parser = make_parser()
parser.setContentHandler(ContentHandler())
@brackendev
brackendev / dart.md
Last active October 29, 2020 17:00 — forked from paulmillr/dart.md
Leaked internal google dart email

---------- Forwarded message ----------

From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
@brackendev
brackendev / pub-clean.sh
Last active November 23, 2020 12:40
[Shell] AngularDart pub clean
#!/bin/sh
# AngularDart pub clean
rm -rf "$HOME/.pub-cache"
rm -rf .dart_tool
rm -f .packages
rm -f .pub
rm -f pubspec.lock
git rm -f .packages
git rm -f .pub
pub cache repair
@brackendev
brackendev / dokku_on_digital_ocean.md
Created May 14, 2020 12:24 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku

@brackendev
brackendev / FindImageMorphs.st
Created October 3, 2019 00:27
[Pharo] Find image morphs
ImageMorph allInstances do: [ :im |
im bounds origin x = 0 & im bounds origin y = 0 &
im bounds corner x = 1 & im bounds corner y = 1 &
im height = 1 & im width = 1
ifTrue: [ im inspect]
].
ImageMorph allInstances collect: [ :im |
im bounds origin x = 0 & im bounds origin y = 0 &
im bounds corner x = 1 & im bounds corner y = 1 &
@brackendev
brackendev / ClozureCL-macOS-build.txt
Last active July 17, 2020 15:37
[Shell] Clozure CL macOS IDE build
Note: This hasn't been updated for macOS Catalina.
1. Download and move <https://gist.github.com/brackendev/97ed0793cf605b123ff14433ff075e0d>
to /usr/local/bin/ccl (for example).
2. Via a shell:
Note: Use latest URLs from <https://github.com/Clozure/ccl/releases>.
$ chmod +x /usr/local/bin/ccl
@brackendev
brackendev / ccl
Last active October 3, 2019 00:28 — forked from fukamachi/ccl
[Shell] Clozure CL launcher script
#!/bin/sh
#
# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
# your Clozure CL installation directory. The lisp will use this
# environment variable to set up translations for the CCL: logical
# host.
# Any definition of CCL_DEFAULT_DIRECTORY already present in the
# environment takes precedence over definition made below.
@brackendev
brackendev / lol-clozure-ccl.lisp
Last active October 3, 2019 00:28
[Common Lisp] Land of Lisp with Clozure CL
;; Page 120
(defun dot->png (fname thunk)
(with-open-file (*standard-output*
fname
:direction :output
:if-exists :supersede)
(funcall thunk))
(ccl:run-program "/usr/local/bin/dot" (list "-Tpng" "-O" fname)))
@brackendev
brackendev / sample-rss-2.0-feed.xml
Created July 24, 2019 21:45 — forked from ToddG/sample-rss-2.0-feed.xml
sample-rss-2.0-feed
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Example Feed</title>
<description>Insert witty or insightful remark here</description>
<link>http://example.org/</link>
<lastBuildDate>Sat, 13 Dec 2003 18:30:02 GMT</lastBuildDate>
<managingEditor>johndoe@example.com (John Doe)</managingEditor>