Skip to content

Instantly share code, notes, and snippets.

View filevich's full-sized avatar
🥜
deez nuts

JP Filevich filevich

🥜
deez nuts
View GitHub Profile
@filevich
filevich / linux-essentials.md
Last active August 26, 2024 16:39
linux install essentials

Gnome config

  • Appearance > Auto-hide the Dock: on
  • Appearance > Icon size: 20
  • Search > Files + Characters: off
  • Sound > Over-Amplification on
  • Power > Auto brightness: off
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active April 25, 2025 18:27
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@xcud
xcud / lessons-learned.md
Last active August 17, 2017 03:02
Lessons Learned by Eric Schmidt transcribed by Abheek Anand

Lessons Learned – The Hard Way Eric Schmidt, E&VC Final Class Transcribed by Abheek Anand

About Management Culture:

  • You get personal leverage through delegation and empowerment, along with inspection
  • Hiring defines a company. Review every job offer every time.
  • Manager (or teams reporting to a manager) should never have the unilateral authority to hire people.
  • Major decisions should be made in large groups, by two joint owners.
  • Be careful about goal-misalignment; goaling drives behavior and conflict.
@stereokai
stereokai / index.css
Created June 18, 2017 11:03
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@xxblx
xxblx / nextcloud.conf
Last active April 8, 2024 16:20
nextcloud nginx config
upstream php-handler {
server unix:/run/php-fpm/www.sock;
}
server {
#listen 443 ssl;
listen 80;
server_name 192.168.1.8;
#ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
@lummie
lummie / enum.go
Last active May 26, 2025 21:36
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@jacquerie
jacquerie / foobar.py
Last active October 28, 2023 16:09
How to decode the message at the end of Google Foobar
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
MESSAGE = '''
EUYQGhMMSx0cU0FIU1MCFAQPG01NQ0gTAEICChUGBxZTRVxBSQoZFQYKHQpKSUNURhcVEgoUFR1I
SltDSBkBTRwKEAgQHxFCSkFJDgkJCgoGCkMLAQBGUklUQhMPAgAJCgYLV0MOSR0VAxAaABZBQVRP
TRICCRVIAk5IEg4dVFRfRkYZBgRARBI=
'''
@hoshi-takanori
hoshi-takanori / gob-example.go
Created May 27, 2015 08:30
How to use bytes.Buffer with gob encoder/decoder.
package main
import (
"bytes"
"encoding/gob"
"io"
)
type Data struct {
A int
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@tracker1
tracker1 / 01-directory-structure.md
Last active May 3, 2025 04:36
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used