Skip to content

Instantly share code, notes, and snippets.

View ktamas77's full-sized avatar
🏠
Working from home

Tamas Kalman ktamas77

🏠
Working from home
View GitHub Profile
@viniciusCamargo
viniciusCamargo / multiple_ssh_setting.md
Last active August 3, 2023 00:01 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different Github accounts

github multiple keys

$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/{private_key}
$ git clone git@{alias}:{github_user}/{repo}.git

~/.ssh/config

// http://www.iquilezles.org/www/articles/palettes/palettes.htm
// to see this function graphed out go to: https://www.desmos.com/calculator/18rq4ybrru
vec3 cosPalette( float t , vec3 brightness, vec3 contrast, vec3 osc, vec3 phase)
{
return brightness + contrast*cos( 6.28318*(osc*t+phase) );
}
vec3 hsb2rgb(vec3 c)
{
@naesheim
naesheim / buildWhenAffected.sh
Last active November 28, 2022 20:20
CircleCi - only build features that has changed
##################
### config.yml ###
##################
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6
steps:
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 25, 2024 03:58 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@RobertCalise
RobertCalise / README.md
Created June 13, 2017 17:26
Grab a URL parameter (hop) and insert it into an Infusionsoft web form hidden field

The Javascript in this gist can be used to grab a parameter (in this example, called "hop") from the URL's query string and place that value into a hidden form field (in this example, with an id of #inf_field_FieldName.)

There are two assumptions in this example, so you should alter them for your own use case.

Assumption 1: the URL parameter you're getting is called "hop".

For example, if you are accessing this page at http://example.com/?hop=something, then this example would retrieve a value of "something". If your URL parameter is called something other than "hop", change it on Line 8 of the example script from

document.getElementById('inf_field_FieldName').value = getUrlParameter('hop');

@koenrh
koenrh / gcp-gpu-vm-hashcat.md
Last active February 4, 2024 18:37
Running Hashcat on Google Cloud's new GPU-based VMs

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

@askilondz
askilondz / gistlog.yml
Last active April 2, 2024 10:44
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@ianklatzco
ianklatzco / discord-bot-post-message.sh
Created December 29, 2016 02:36
sends a message to a discord channel via a bot using command line HTTP POST- curl
#!/bin/bash
# update the TOKEN and the CHANNELID, rest is optional
# you may need to connect with a websocket the first time you run the bot
# use a library like discord.py to do so
curl -v \
-H "Authorization: Bot TOKEN" \
-H "User-Agent: myBotThing (http://some.url, v0.1)" \
-H "Content-Type: application/json" \
@wojteklu
wojteklu / clean_code.md
Last active April 24, 2024 12:26
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@UndefinedOffset
UndefinedOffset / nr-deploy-post-merge-hook.sh
Last active July 9, 2021 10:19
A simple git deploy hook for notifying New Relic of deployments, it assumes that the base folder name of the repository is the application name. To set git to use this script you simply add this file into your .git/hooks folder as "post-merge".
#!/bin/bash
#New Relic API Key see https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/api-key#creating
NR_API_KEY="INSERT_API_KEY_HERE"
#Find New Relic App Name, if your top level folder is not the name of your application change the below two lines to simply NR_APP_NAME="MY_APP_NAME".
NR_APP_NAME=$(git rev-parse --show-toplevel)
NR_APP_NAME=$(basename "$NR_APP_NAME")
#Get the current git branch