Skip to content

Instantly share code, notes, and snippets.

View clockworkpc's full-sized avatar

Alexander Garber clockworkpc

View GitHub Profile
@clockworkpc
clockworkpc / create_linkedin_post.py
Created April 21, 2024 10:55
Python script for uploading a simple text post to LinkedIn
from dotenv import load_dotenv, find_dotenv
from linkedin_api.clients.restli.client import RestliClient
import json
import os
import sys
"""
ACCESS_TOKEN must available either as a system variable or in .env in the same folder as this script
In order to generate the access token, you have to register a LinkedIn app.
@clockworkpc
clockworkpc / devise.he.yml
Created March 17, 2024 11:29
Hebrew Translations for Devise
he:
devise:
confirmations:
confirmed: "חשבונך אושר בהצלחה. כעת הנך מחובר."
send_instructions: "בדקות הקרובות יגיע אליך אימייל עם הנחיות כיצד לאשר את הרשמתך."
send_paranoid_instructions: "אם חשבונך נמצא במסד הנתונים, תקבל בדקות הקרובות אימייל עם הנחיות אישור הרשמתך"
link: "לא קיבלת הנחיות לאישור ההרשמה?"
errors:
messages:
already_confirmed: "כבר אומת, אנא נסה להתחבר שוב"
@clockworkpc
clockworkpc / init.vim
Created August 25, 2022 14:32
Neovim Config File
"*****************************************************************************
"" CPC NEOVIM CONFIGURATION
"" Maintainer: Alexander JK Garber
"*****************************************************************************
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
@clockworkpc
clockworkpc / arch_initial_setup.sh
Last active December 28, 2020 08:58
Arch Initial Setup
#!/bin/bash
echo "Setting up my required packages."
echo "Need sudo..."
sudo echo "Now I have sudo."
sudo pacman -Syu git xclip
git clone https://aur.archlinux.org/yay-git.git
cd ~/yay-git
makepkg -si
@clockworkpc
clockworkpc / .bashrc
Created March 15, 2020 11:17
.bashrc
# This bashrc will source files from any profilerc directories
# linked into users home.
#
# Unique configuration for different profiles should be placed
# in that profiles respective profilerc directory.
#
# For example, default will contain the directory .profilerc_default
# with any files that should be sourced within it.
#
for profilerc in $(ls -d ~/.profilerc_*/*); do
@clockworkpc
clockworkpc / .vimrc
Created March 14, 2020 11:46
My Neovim Configuration File (symlinked to .vimrc)
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'https://github.com/tiagofumo/vim-nerdtree-syntax-highlight.git'
Plug 'ryanoasis/vim-devicons'
Plug 'junegunn/fzf', { 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
@clockworkpc
clockworkpc / 112-things-learned-ruby-programming.md
Last active May 16, 2018 08:59
112 Things I Have Learned about Ruby Programming

1. This course is good gauge of one's progress in learning to code. I skimmed through most of the course, even the advanced topics, with ease.

2. #print does not include a carriage return.

3. Parallel variable assignment.

a, b, c = 10, 20, 30
@clockworkpc
clockworkpc / things_learned_from_udemy_ruby_course.md
Created May 13, 2018 08:06
Things I Learned from 'Learn To Code with Ruby' by Boris Paskhaver
  1. I have learned a lot since I took up programming. Working through the course consolidated my knowledge and helped me to grasp some things I understand loosely. Accordingly, the rest of this list is a mix of reminders and revelations.

#2. #print does not include a carriage return.

#3. Parallel variable assignment.

a = 10 b = 20 c = 30

@clockworkpc
clockworkpc / app79.js
Created April 24, 2018 00:13
nodejs-course-lecture-79
var express = require('express');
var app = express();
var htmlController = require("/controllers/htmlController")
var apiController = require("/controllers/apiController")
var port = process.env.PORT || 1337;
app.use('/assets', express.static(__dirname + '/public'));
@clockworkpc
clockworkpc / html_classes_to_css.rb
Last active June 12, 2017 05:03
Convert HTML Classes to CSS
html_file = ARGV[0]
css_file = "app/assets/stylesheets/css_output.css"
class_array = Array.new
open_html_file = File.readlines(html_file)
open_css_file = File.open(css_file, "w+")
open_html_file.each do |line|
search_string = /class="[a-z]*"/