Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile
# THESE DO NOT WORK.
# Grant permissions from all tables in database and is a base table to casino.
REVOKE SELECT, INSERT, UPDATE, DELETE
ON ALL TABLES IN SCHEMA public
from discourse;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public TO discourse;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA <schema_name> TO <user>;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public TO ghost;
GRANT select, insert, update, delete on ALL TABLES IN SCHEMA public from casino;
@fire
fire / gist:8eaf3f9afa0da89eebb4
Last active August 29, 2015 14:03
Smartos style ps process from bluepill
def ps_axu
# TODO: need a mutex here
store[:ps_axu] ||= begin
if RbConfig::CONFIG["arch"] == "x86_64-solaris2.11"
lines = `ps -eo pid,ppid,pcpu,rss,etime,comm`.split("\n")
else
# BSD style ps invocation
lines = `ps axo pid,ppid,pcpu,rss,etime,command`.split("\n")
end
@fire
fire / gitlab.md
Last active January 22, 2020 09:17 — forked from jhoughtelin/gitlab.sh
Git lab install on smartos

Gitlabs on Smartos

Note this script is not executable. Please read through and manually apply each command.

Install necessary packages

  pkgin up
  pkgin -y in \
        bash \
        coreutils \
        curl \

gcc47 \

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
cinst chef-client git
git clone https://github.com/fire/chef-repo.git
# chef will:
# cinstall visual studio
# install ci runner
# download dependencies
/* Copyright (c) 2014 K. Ernest 'iFire' Lee
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@fire
fire / gist:1131ac45419eb6cb6dea
Created July 22, 2014 08:22
MountWindowsSharesPermanently
[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=SensibleEditorSourceCodeAccessor
to
Engine/Config/BaseEditorUserSettings.ini
@fire
fire / gist:a3e108a113fc98f09dce
Created July 28, 2014 22:05
Git annex test on smartos
Tests
QuickCheck
prop_idempotent_deencode_git: OK
+++ OK, passed 1000 tests.
prop_idempotent_deencode: OK
+++ OK, passed 1000 tests.
prop_idempotent_fileKey: OK
+++ OK, passed 1000 tests.
prop_idempotent_key_encode: OK
+++ OK, passed 1000 tests.
cmake ../UnrealEngine/ -G "CodeBlocks - Ninja"
#Must do these as root.
openssl genrsa -out example.com.key 4096
#you will be prompted to enter password
openssl rsa -in example.com.key -out example.com.key.nopass
#you will be prompted to enter password you created in last step
openssl req -new -key example.com.key.nopass -out example.com.csr
#you will be prompted to enter country code (US), State name, City name, Organization name etc. The most important one is "Common Name", it must be the same as your domain name. For those optional item (ones marked as []", just press enter. Don't enter "A challenge password"
cat example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > example_com.crt