Skip to content

Instantly share code, notes, and snippets.

@Darep
Darep / components.some-component.js
Created May 12, 2016 13:50
component init on route change?
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
console.log('init!!1');
},
willDestroy() {
console.log('noooo dsetroyer');
@Darep
Darep / no-comments.js
Created May 30, 2016 07:01
Remove all comments from GitHub Pull Request
// Sometimes it's necessary to do a bit of clean-up
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) {
el.removeAttribute('data-confirm');
el.click();
});
@Darep
Darep / circle.yml
Created November 3, 2017 11:17
utf8mb4 for CircleCI in Rails
database:
override:
- mv config/database.ci.yml config/database.yml
- RAILS_ENV="test" RACK_ENV="test" bundle exec rake db:create db:structure:load ts:configure ts:index ts:start --trace
#!/bin/sh
#
# Diffs the bundles of a branch with master.
#
BRANCH=$1
# Don't build master if we already have it
if [ ! -d "build_master" ]; then
echo 'Building "master" branch bundle...'
@Darep
Darep / fl-scrape.ts
Created June 15, 2024 22:17
Scrape Flockler site articles and/or images to local files.
/**
* Scrape Flockler site articles and/or images to local files.
*
* Usage:
* $ bun fl-scrape.ts --get-articles --get-images
*/
// change this to your Flockler site ID
const SITE_ID = 1;