Skip to content

Instantly share code, notes, and snippets.

View ifyouseewendy's full-sized avatar

Di Wen ifyouseewendy

View GitHub Profile
@ifyouseewendy
ifyouseewendy / obsidian-web-clipper.js
Last active February 11, 2023 05:34 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([
import("https://unpkg.com/turndown@6.0.0?module"),
import("https://unpkg.com/@tehshrike/readability@0.2.0"),
]).then(async ([{ default: Turndown }, { default: Readability }]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
const folder = "/2 Cards";
@ifyouseewendy
ifyouseewendy / serializer_benchmarks.rb
Created April 29, 2020 19:11 — forked from aishfenton/serializer_benchmarks.rb
Performance comparison of different ruby serializer methods
# sudo gem install bson
# sudo gem install bson_ext
# sudo gem install yajl-ruby
# sudo gem install json
# sudo gem install msgpack
require 'rubygems'
require 'benchmark'
require 'yaml'
require 'bson'
@ifyouseewendy
ifyouseewendy / README-Template.md
Created February 26, 2020 18:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ifyouseewendy
ifyouseewendy / pg.rake
Last active January 4, 2016 14:56 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/pg.rake
namespace :pg do
desc "Dumps the database to backups"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump -h #{host} -d #{db} -U #{user} -Ft -v -c -f #{Rails.root}/public/resources/duoduo/db_backup/#{Time.now.strftime("%Y%m%d%H%M%S")}_#{db}.tar"
end
puts cmd
exec cmd