Skip to content

Instantly share code, notes, and snippets.

View jkordish's full-sized avatar

Joseph Kordish jkordish

  • Trellix
  • San Antonio
  • 03:33 (UTC -05:00)
View GitHub Profile
@sarimarton
sarimarton / fix_github_copilot.sh
Last active April 24, 2024 06:59
Fix Github Copilot in dealing with self-signed certificates
# [2023-05-25] Added Copilot Chat, and VSCode Insiders
# [2023-05-20] Add VSCode Insiders variant
# [2023-02-22] Added Copilot Labs
# Fix Github Co-pilot self-signed cert problem
# See: https://github.com/orgs/community/discussions/8866#discussioncomment-3517831
# Note
#
# To make Github Copilot/Nightly/Labs/Chat work, you might need additional
@barn
barn / .gitconfig
Created April 18, 2018 18:01
Add this to your git config (found via some stackoverflow, and beaten till it worked)
[alias]
recent = "!r() { \
git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' \
| column -ts'|' \
| cut -c -$(tput cols) \
;}; r"
anonymous
anonymous / playground.rs
Created May 15, 2016 16:50
Shared via Rust Playground
use std::io::prelude::*;
use std::fs::File;
use std::io::{ Error, ErrorKind };
fn open_file(path: &str) -> Vec<u8> {
let mut f = match File::open( path ) {
Ok(x) => x,
Err(e) => match e.kind() {
ErrorKind::NotFound => /*idk what you want to do*/,
use async::fs::File;
use async::io::Async;
fn copy(src: &Path, dst: &Path) -> impl Async<()> {
let src = try!(File::open(src));
let dst = try!(File::create(dst));
// Copy a kiB at a time.
let mut buffer = Vec::with_capacity(1024);
loop {
@seriyps
seriyps / tcp_server.rs
Last active November 17, 2022 10:08
Simple concurrent TCP echo server (rust 0.11)
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
extern crate green;
extern crate rustuv;
use std::io;
use std::os;
use std::io::{Listener,Acceptor,TcpStream};
#[start]
@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active May 27, 2022 23:59
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
@onyxraven
onyxraven / rds.sh
Last active June 21, 2022 13:42 — forked from douglasjarquin/gist:2208690
Amazon RDS Performance Tuning Settings
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120
@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 19, 2024 07:07
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname