Skip to content

Instantly share code, notes, and snippets.

View anthony2025's full-sized avatar
🛵

Anthony Ascencio anthony2025

🛵
View GitHub Profile
@anthony2025
anthony2025 / cloudSettings
Last active February 5, 2018 02:34
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-05T02:34:41.689Z","extensionVersion":"v2.8.7"}
In the command line, type in "sudo nano /etc/hosts".
When asked, type your admin password.
In the screen that will appear, you’ll see the host database for your computer.
Using your down arrow, go to the bottom, right under where it says, "127.0.0.1 localhost".
Type in "127.0.0.1 facebook.com".
On a new line, type in "127.0.0.1 www.facebook.com"; this is for extra measure.
Now, press Control + “O”. This will save the changes to the host database.
Hit “Return” and then Control + “X” to exit the screen.
Remove the existing cache by typing in "sudo dscacheutil -flushcache" in the command line, this refreshes the existing cache on the host database.
You should receive an “Unable to connect” error message when you go to Facebook.com now.
#!/bin/bash
echo "requesting email notification, it might take a few minutes to arrive"
# indentation is weird on this function
generate_email_parameters() {
cat <<EOF
{
"userEmail": "$USER_EMAIL",
"jobName": "$JOB_NAME",
@anthony2025
anthony2025 / docker_ssh.sh
Last active December 28, 2017 15:12 — forked from mitchwongho/Docker
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@anthony2025
anthony2025 / ssh.sh
Created December 19, 2017 20:16
SSH as root
# ssh as ubuntu and then change to root
sudo su -
@anthony2025
anthony2025 / .vimrc
Created December 29, 2017 14:53
Vim config
" no compatible at the very start
set nocompatible
" VIM-PLUG Setup
" Automatic installation {{{
if empty(glob('~/.vim/autoload/plug.vim'))
silent !mkdir -p ~/.vim/autoload
silent !curl -fLo ~/.vim/autoload/plug.vim
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
function jarify() {
jar cmvf META-INF/MANIFEST.MF $1 $2
}
function mkcd() {
mkdir -p "$@" && cd $_
}
function dotfiles() {
cd ~;
# you usually gotta do and upgrade then
pacaur -Syyu --devel --needed
# to get the latest shit for the Ycm Engine
# to encrypt:
openssl enc -in ./auth.json -aes-256-cbc -pass file:./password -out auth.json.encrypted
# to decrypt:
openssl enc -d -in ./auth.json.encrypted -aes-256-cbc -pass file:./password -out auth.json
[ignore]
[include]
./src/
[libs]
[lints]
[options]