Skip to content

Instantly share code, notes, and snippets.

@speakingcode
speakingcode / manage-dotifles-git.md
Created March 31, 2026 09:26
easily manage dotfiles with git

Manage Dotfiles with Git

Method 1: Bare Git Repository

This approach uses only Git, without symbolic links or extra tools. It involves creating a bare repository in your home directory and using an alias to manage it.

Setup Steps

Initialize a bare repository:

git init --bare $HOME/.dotfiles
@speakingcode
speakingcode / corona-info.md
Last active May 27, 2020 20:30
Corona info - legit government and academic/scientific sources of covid19 info
@speakingcode
speakingcode / 2-13-2020-chicken-breast
Last active June 30, 2020 20:24
food-descriptions
~|| chicken breast • cauliflower • carrots • broccoli • cucumber ||~
• 𝓯𝓸𝓵𝓵𝓸𝔀 ~@loveandplate~ 𝓽𝓸 𝓼𝓮𝓮 𝓶𝔂 𝓬𝓻𝓮𝓪𝓽𝓲𝓸𝓷𝓼 •
• chicken breast/rosemary/black pepper
• purple cauliflower/nutmeg/coriander/almond milk
• carrots/honey
• broccoli/orange cauliflower/garlic
• cucumber/vinegar/dill
@speakingcode
speakingcode / rails-docker.md
Last active January 15, 2020 22:49
Initialize projects with docker

regla rails project:

docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle webapp

api mode:

docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app rails rails new --skip-bundle webapp --api
@speakingcode
speakingcode / promises.md
Last active March 12, 2019 03:59
Some notes about promises and how they're useful

suppose we want to get the operator details about the operator for a particular user's location to minimize the size of payloads, the REST api doesn't give back all the relational data for each model, only foreign keys to the related models.

so we fetch the user info (by id), and in the xample we assume the user info has a location_id, then we fetch the location whose id matches, then we assume that has a operator_id. then we get the operator whose id matches that

callbacks:

//chaining three requests
const getOperatorForUsersLocation = (user_id, successCallback, errorcallBack)  => {
@speakingcode
speakingcode / infosec_resources.md
Last active February 11, 2019 16:49
Infosec Resources

all of this is writtern assuming you want to seriously pursue being a badass in infosec. adjust accordingly

basics/computer fundamentals

ok so the thing to remember is security is very broad. there's a sort of core set of topics but there's just so much one off stuff, because ultimately it's all about access to information and services and in reality information systems are composed of networks of myriad devices running myriad software. there are many vectors of attack and many points of failure.

offensively security is all about using things in unintended ways and understanding the 'unexpected' outcomes, manipulating them for favor. defensively, it is about predicting unintended uses and ensuring the design of systems protects against them. both require intimate knowledge of the system. so the foundation of any good security expert is systems knowledge. that said, the obvious things you need to understand at least basics about:

  • computer hardware and architecture
    • processors, instruction sets
  • me
@speakingcode
speakingcode / codez1
Last active August 29, 2015 14:13
code code code c0d3 k[]d+++ *$*@()! )8 00011010001001110101101010101001011010--+--+-+++
[18:08] <@speakingcode> isn't everything jsut code though/
[18:08] <@speakingcode> do words really have meaning? every word is defined with other words
[18:09] <@speakingcode> every concept is just a represenation of something else
[18:09] <@speakingcode> welcome to the deconsturctionist terror
[18:09] <@speakingcode> this is why math is divine
[18:09] <@speakingcode> numbers are the only thing to have inherent meaning
[18:09] <@speakingcode> _only_
[18:11] < razorsharph> The problem with learning how to program and code by myself online is that when I start learning one thing I end up having to stop because I dont understand something and then have to go and learn a whole new thing in order to understand the initial
problem
[18:11] < razorsharph> And it happens over and over and over
//Node Code
//
var base64 = require('base64-stream');
var request = require('request').defaults({encoding: null});
exports.show = function (req, res) {
request.get(apiURL + req.params.slug,
function (error, response, body) {
if (response) {
@speakingcode
speakingcode / parser.groovy
Last active August 29, 2015 14:05
sample of groovy in action
package com.argodata.match.empi.tools.hl7log
import org.springframework.stereotype.Component
/**
* Created by dlissner on 8/22/14.
*/
@Component
class Hl7LogParser {
def messageTypePattern = ~/ADT\^A[0-9]{2}/,
@speakingcode
speakingcode / 0_reuse_code.js
Created June 27, 2014 21:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console