Skip to content

Instantly share code, notes, and snippets.

@atonse
atonse / tldraw.html
Created November 17, 2023 03:10
Code generated by tldraw.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Draggable Links</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/@shopify/[email protected]"></script>
<style>
#link-categories {
➜ ~ curl https://webkit.org
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
@atonse
atonse / components.st-popover.js
Last active June 27, 2016 21:30
Liquid Tether
import Ember from 'ember';
export default Ember.Component.extend({
wrapperClassNames: ['col-lg-12', 'col-md-12', 'col-sm-11', 'col-xs-12'],
shouldDisplay: false,
actions: {
show() {
this.set('shouldDisplay', true);
},
@atonse
atonse / config.js
Created June 9, 2016 20:56
example config object for your js app that wastes your time cuz it didn't provide this for you
export default {
development: {
apiBaseURL: "https://localhost:8888/v1"
},
qa: {
apiBaseURL: "https://api.qa.something.com/v1"
},
import Ember from 'ember';
export default Ember.Component.extend({
didRender() {
this._super(...arguments);
let svg = d3.select(this.$('.pipeline-view-container')[0]).append('svg');
let xScale = d3.time.scale()
.domain([new Date(), new Date()])
.range([0, 500])
@atonse
atonse / controllers.application.js
Last active April 14, 2016 15:28
Datepicker UTC Issues
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});

Keybase proof

I hereby claim:

  • I am atonse on github.
  • I am atonse (https://keybase.io/atonse) on keybase.
  • I have a public key ASBaxav8FQZqBLvSlplcle_YNeQz2hK7ZkNgRMXDqNOBbgo

To claim this, I am signing this object:

@atonse
atonse / chef_solo_bootstrap.sh
Last active December 11, 2015 09:58 — forked from ryanb/chef_solo_bootstrap.sh
Ubuntu 12.04 LTS, Ruby 1.9.3p374
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev lib64readline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p374.tar.gz
tar -xvzf ruby-1.9.3-p374.tar.gz
cd ruby-1.9.3-p374/
./configure --prefix=/usr/local
make
make install
@atonse
atonse / gist:1217868
Created September 14, 2011 21:37
Undefine certain task so there is no chance of running this by mistake in a more important environment
def undefine_task(*names)
app = Rake.application
tasks = app.instance_variable_get('@tasks')
names.flatten.each { |name| tasks.delete(name) }
end
if %W{production staging integration}.include?(Rails.env)
undefine_task %w(
db:bootstrap
db:bootstrap:reset
@atonse
atonse / gist:1165820
Created August 23, 2011 16:47
Gmail Poll IMAP
def self.perform
imap = Net::IMAP.new('imap.gmail.com', 993, true)
imap.login('MAILBOX', 'PASSWORD')
loop do
imap.select('INBOX')
imap.search(['UNSEEN']).each do |message_id|
messages = imap.fetch(message_id, ['RFC822'])
messages.each do |message|