Skip to content

Instantly share code, notes, and snippets.

View christophior's full-sized avatar

Chris Villarreal christophior

View GitHub Profile
@christophior
christophior / yahoo_finance_dark.css
Last active November 23, 2021 00:41
stylebot yahoo finance dark mode
/** Make sure below applies to finance.yahoo.com **/
/** Paste this CSS into a web browser extension that allows custom CSS, like Stylebot for Chrome/Firefox (not affiliated, just what I use): https://stylebot.dev/ **/
:root {
--primaryColor: #d0d0d0;
}
/** Hides annoying ad space. Make sure you use an ad-block like uBlock Origins as well **/
#Lead-0-SearchAdV2-Proxy,
@christophior
christophior / fix_github_https_repo_origin.sh
Last active April 11, 2018 21:41 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH for origin
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@christophior
christophior / gh-pages-deploy.md
Created July 6, 2017 20:22 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@christophior
christophior / nginx.default
Created April 12, 2017 06:51
nginx setup to redirect 8000 to 80
server {
listen 80;
server_name chris.paypal.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
(•_•)
( •_•)>⌐■-■
(⌐■_■)
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/.build": true
}
,
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "shift+cmd+o", "command": "workbench.action.quickOpen" }
]
var _ = require('underscore');
var BigNumber = require('bignumber.js');
/////// tree //////////
function Node(data, weight) {
this.data = data;
this.weight = weight;
this.parent = null;
this.children = [];
@christophior
christophior / removeNode.sh
Created January 11, 2016 23:15
Remove everything to do with node and npm on a mac
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# download new version of node from https://nodejs.org/en/download/releases/ and install
adb shell
settings put global preferred_network_mode 9
settings put global preferred_network_mode1 9
settings put global preferred_network_mode2 9
reboot
/*
* Name : T-Mobile LTE
* APN: fast.t-mobile.com
* MMSC: http://mms.msg.eng.t-mobile.com/mms/wapenc