Skip to content

Instantly share code, notes, and snippets.

View rcyrus's full-sized avatar

Rajeev Cyrus rcyrus

  • Minneapolis, Minnesota
View GitHub Profile
@rcyrus
rcyrus / Cloud Gaming on Apple Vision Pro.md
Created February 3, 2024 06:00 — forked from KhaosT/Cloud Gaming on Apple Vision Pro.md
Guide for clouding gaming on Apple Vision Pro

Cloud Gaming on Apple Vision Pro

GeForce Now

Cloud Gaming is a great way to enjoy graphically demanding games on Apple Vision Pro.

Since Safari on visionOS does not support PWA mode, here is how you can access cloud gaming services on Apple Vision Pro.

What’s needed

@rcyrus
rcyrus / rails_webpacker_bootstrap_expose_jquery.md
Created March 19, 2019 13:59 — forked from andyyou/rails_webpacker_bootstrap_expose_jquery.md
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@rcyrus
rcyrus / gist:ef0cc9e25eca3167cac4dc0db5170908
Created May 31, 2017 16:04 — forked from kakoni/example.rb
Blind indexes using ruby
require 'rbnacl'
require 'base64'
class Example
attr_reader :secret_box, :index_key
def initialize
key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
@index_key = RbNaCl::Random.random_bytes(RbNaCl::SecretBox.key_bytes)
@secret_box = RbNaCl::SecretBox.new(key)
@rcyrus
rcyrus / 0_reuse_code.js
Created April 26, 2017 20:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rcyrus
rcyrus / hn_seach.js
Created October 3, 2015 03:50 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
total = 0, shown = 0,
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments);
// This traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.className === klass) {

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@rcyrus
rcyrus / postgres_array.go
Created September 28, 2015 22:25 — forked from adharris/postgres_array.go
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@rcyrus
rcyrus / .bashrc
Last active September 17, 2015 18:23 — forked from vsouza/.bashrc
Golang 1.4.1 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
Superfish uses an SDK from Komodia to do SSL MITM. That's probably known by now.
Superfish isn't the only product to use that sdk. there's others too.
Each product that uses the Komodia SDK to MITM, has its OWN CA cert and private
key pair. Seems a lot of people think they all use the superfish cert. That is
NOT the case.
First thing I checked was komodia's own parental control software,
Keep My Family Secure. (mentioned on komodia's own website).