Skip to content

Instantly share code, notes, and snippets.

import React, { useState, useEffect } from "react";
import "./styles.css";
const data = [
{ id: 1, name: "Marco" },
{ id: 2, name: "Lincoln" },
{ id: 3, name: "Aya" }
];
export default function App() {
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Opinion Lexicon: Positive
;
; This file contains a list of POSITIVE opinion words (or sentiment words).
;
; This file and the papers can all be downloaded from
; http://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
;
; If you use this list, please cite one of the following two papers:
@bluengreen
bluengreen / IllustratorSaveAsSVGs.jsx
Created February 25, 2022 08:23 — forked from seltzered/IllustratorSaveAsSVGs.jsx
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source
@bluengreen
bluengreen / hash.rb
Created November 19, 2018 00:31 — forked from jodosha/hash.rb
Ruby's Hash deep search
class Hash
def deep_has_key?(key)
self.has_key?(key) || any? {|k, v| v.deep_has_key?(key) if v.is_a? Hash}
end
alias :deep_include? :deep_has_key?
alias :deep_key? :deep_has_key?
alias :deep_member? :deep_has_key?
def deep_has_value?(value)
self.has_value?(value) || any? {|k,v| v.deep_has_value?(value) if v.is_a? Hash}
@bluengreen
bluengreen / note.md
Created November 6, 2018 07:09
Integrate acts-as-taggable-on with activeadmin

model

class Product < ActiveRecord::Base
  acts_as_taggable_on :categories, :tag
  ....

activeadmin

form

@bluengreen
bluengreen / GitHub curl.sh
Created November 3, 2018 05:43 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
Install s3fs on Mac OS X
1 - Install Homebrew - http://brew.sh/
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
2 - Use Homebrew to install s3fs + dependencies
brew install s3fs
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
@bluengreen
bluengreen / gist:4ae1976d0666ee6f20d9d3b649c44191
Created October 25, 2018 05:13 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@bluengreen
bluengreen / gist:f803536d8aad123f35175346081a426b
Created October 25, 2018 05:13 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@bluengreen
bluengreen / postgres_rails_os_x
Created May 18, 2018 02:17 — forked from migzsuelto/postgres_rails_os_x
PostgreSQL with Rails on OS X
# Setting up and using PostgreSQL with Rails on OS X
# Allows you to use PostgreSQL instead of sqlite3, and have the same database type as Heroku
# Install postgres using homebrew
brew install postgres
# Follow directions provided by postgres installation
# Instructions for this part can be retrieved again using "brew info postgres"
# This creates a default user according to your system name
# If you encounter an error similar to this, then check out these helpful links