Skip to content

Instantly share code, notes, and snippets.

View anthony2025's full-sized avatar
🛵

Anthony Ascencio anthony2025

🛵
View GitHub Profile
# you usually gotta do and upgrade then
pacaur -Syyu --devel --needed
# to get the latest shit for the Ycm Engine
function jarify() {
jar cmvf META-INF/MANIFEST.MF $1 $2
}
function mkcd() {
mkdir -p "$@" && cd $_
}
function dotfiles() {
cd ~;
@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
@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 / 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
#!/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",
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.
@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"}
const solarized = {
base03: '#002B36',
base02: '#073642',
base01: '#586E75',
base00: '#657B83',
base0: '#839496',
base1: '#93A1A1',
base2: '#EEE8D5',
base3: '#FDF6E3',
yellow: '#B58900',
@anthony2025
anthony2025 / destructuring.js
Created June 19, 2017 03:37 — forked from weslleyaraujo/destructuring.js
Several demos and usages for ES6 destructuring.
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];