Skip to content

Instantly share code, notes, and snippets.

  1. Install xbar

    • (if you have homebrew installed, you can run brew install --cask xbar in your terminal to install it)
  2. Run xbar by double-clicking the application or using Spotlight (cmd space)

    • xbar should show up in your mac menubar
  3. Open a terminal, navigate to a folder for coding projects, make a new folder for your plugin:

    mkdir xbar-jokes-plugin

cd xbar-jokes-plugin

@peterxjang
peterxjang / Modal.css
Created July 16, 2022 17:28
Simple React modal
.modal {
display: block;
position: fixed;
top: 0;
left: 0;
width:100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
}
@peterxjang
peterxjang / slack_export_reader.rb
Last active July 15, 2022 16:12
A basic script to view the JSON output of a Slack export
# INSTRUCTIONS
# Export your Slack JSON data: https://slack.com/help/articles/201658943-Export-your-workspace-data
# Open the zip file to create a directory with the Slack data formatted as JSON
# In the root of that directory, make a Ruby file `slack_export_reader.rb` and copy this code into it
# In your terminal, install the tty-prompt gem: `gem install tty-prompt`
# In your terminal, navigate to the directory and run `ruby slack_export_reader.rb`
require "json"
require "pathname"
require "tty-prompt"
@peterxjang
peterxjang / TIL.md
Last active November 12, 2019 00:15

2019-11-12

You can ....

2019-11-11

You can add code to a gist using triple backticks!

def hello
  puts "hi"
end
@peterxjang
peterxjang / til.md
Last active February 17, 2019 16:39

2018-02-17

You can write code samples in markdown using triple backticks!

def hello
  puts "hi"
end
def test
puts "This is a test"
end
test

TIL - Today I Learned

2018/06/17

You can write code using triple backticks

def hello
  puts "hello world"
end
@peterxjang
peterxjang / til.md
Last active November 5, 2017 16:48

TIL - Today I learned

11/5/17

You can format text using MarkDown - asterisks make text italics like this Sample code can be written using triple backticks

puts "Hello"
puts "Goodbye"
@peterxjang
peterxjang / til.md
Last active November 4, 2017 18:10
TIL - Today I Learned

TIL - Today I learned

3/29/17

Gists are a great tool for sharing text - whether it be code or other information - online for anyone to see. You can make Gists public so that anyone can see it, or secret so that only people you share the url with can see it.

@peterxjang
peterxjang / til.md
Last active June 25, 2017 19:04
TIL - Today I Learned

TIL

6/25/17

You can format text using markdown!

6/25/17

Here's an interesting terminal command that I learned:

cd ../..