Skip to content

Instantly share code, notes, and snippets.

View unicornrainbow's full-sized avatar
💖
🎈Sharing codes 🔫🛍🛁📐🎉💉🕳🚬💎💰💳

Rashiki Grace unicornrainbow

💖
🎈Sharing codes 🔫🛍🛁📐🎉💉🕳🚬💎💰💳
  • Newstime
  • Daytona Beach, FL
View GitHub Profile
@unicornrainbow
unicornrainbow / color4tweet.user.js
Last active December 20, 2021 10:33
Colorize Your Twitter Stream 🎈 Colorize The World. 🎊
// ==UserScript==
// @name Color 4 Tweet
// @version 0.1.2
// @grant none
// @match https://twitter.com/*
// @require https://unpkg.com/jquery@3.6.0/dist/jquery.js
// @require https://unpkg.com/jquery.initialize@1.3.0/jquery.initialize.js
// @grant GM_addStyle
// @grant GM_setValue
// ==/UserScript==
@unicornrainbow
unicornrainbow / Color4FaceeBoOK.user.js
Created August 6, 2021 02:26
See things in color, greasemonkey script, works life butter.
// ==UserScript==
// @name Color 4 FaceBoOK 🤩
// @version 1
// @match https://www.facebook.com/*
// @require https://unpkg.com/jquery@3.6.0/dist/jquery.js
// @require https://unpkg.com/jquery.initialize@1.3.0/jquery.initialize.js
// @grant none
// ==/UserScript==
@unicornrainbow
unicornrainbow / 💫😇😍
Created July 21, 2021 01:35
githUb piNk bikiNi sTiLiSh
body {
--candy-pink: #e81ced;
--comments: #ff9cec;
--link-color: #ff25f5;
background-color: aquamarine;
}
a {
color: #ff25f5;
}
@unicornrainbow
unicornrainbow / in.rb
Created September 21, 2011 04:03
Ruby #in method.
# in extension to object.
#
class Object
# Returns true if the object sent #in is included in the argument list.
#
# Usage in conditionals:
#
# if 1.in 1, 2, 3
# puts "1 was included"
# end
def self.prevent_recursion(method_name)
flag_name = "in:#{name}##{method_name}"
original = instance_method(method_name)
define_method(method_name) do |*args|
if Thread.current[flag_name]
return
else
begin
Thread.current[flag_name] = true
original.bind(self).call(*args)
@unicornrainbow
unicornrainbow / unmount_disk
Created January 18, 2014 07:37
Unmount a disk by name on OSX.
#! /usr/bin/env bash
disk=$(diskutil list | grep <Disk Name> | awk '{ print $6}')
diskutil unmount "/dev/$disk"
user sax staff;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
pid /var/run/nginx.pid;
@unicornrainbow
unicornrainbow / syria.md
Created September 11, 2013 06:49
A message from the president, which I received and he asked me to share.

Good evening --

I just addressed the nation about the use of chemical weapons in Syria.

Over the past two years, what began as a series of peaceful protests against the repressive regime of Bashar al-Assad has turned into a brutal civil war in Syria. Over 100,000 people have been killed.

In that time, we have worked with friends and allies to provide humanitarian support for the Syrian people, to help the moderate opposition within Syria, and to shape a political settlement. But we have resisted calls for military action because we cannot resolve someone else's civil war through force.

The situation profoundly changed in the early hours of August 21, when more than 1,000 Syrians -- including hundreds of children -- were killed by chemical weapons launched by the Assad government.

@unicornrainbow
unicornrainbow / gist:6432979
Created September 4, 2013 05:12
Differences between rails projects generated with --database with postgresq| versus mysql.
diff --git c/Gemfile i/Gemfile
index 36c38ba..e999a91 100644
--- c/Gemfile
+++ i/Gemfile
@@ -3,8 +3,8 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
-# Use postgresql as the database for Active Record
-gem 'pg'
@unicornrainbow
unicornrainbow / routes.rb
Created September 3, 2013 01:32
Otput and snippets from rails generator
MyApplication::Application.routes.draw do
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'