Skip to content

Instantly share code, notes, and snippets.

View serverhorror's full-sized avatar

serverhorror serverhorror

  • Earth
View GitHub Profile
@serverhorror
serverhorror / 80x24.txt
Last active May 17, 2024 17:32
80 x 24 to prepare screencast
xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
x x
x 80x24 x
x x
x x
x x
x x
x x
x x
x x
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active July 11, 2024 21:10
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@esys
esys / autoscaler-eks.ts
Last active January 30, 2023 10:40
eks cdk install cluster autoscaler
import * as cdk from "@aws-cdk/core";
import * as eks from "@aws-cdk/aws-eks";
import * as ec2 from "@aws-cdk/aws-ec2";
import * as iam from "@aws-cdk/aws-iam";
import { CfnJson } from "@aws-cdk/core";
export class MyCluster extends cdk.Construct {
constructor(scope: cdk.Construct, id: string) {
super(scope, id);
@glnds
glnds / aws-transfer-sftp.yaml
Last active February 23, 2024 09:53
CloudFormation template for AWS Transfer for SFTP
---
AWSTemplateFormatVersion: '2010-09-09'
Description: some-sftp-server
Parameters:
HostedZoneIdParam:
Type: String
Description: Hosted Zone ID
SFTPHostnameParam:
Type: String
@xynova
xynova / aws-registry-credential-cron.yml
Last active November 17, 2021 17:57
Kubernetes CronJob to keep AWS Registry pull credentials fresh
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: aws-registry-credential-cron
spec:
schedule: "* */8 * * *"
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
jobTemplate:
spec:
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active May 22, 2024 13:44
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@pelson
pelson / example.ipynb
Last active February 21, 2024 16:05
Example of authenticating a GitHub app using jwt in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@RichardHightower
RichardHightower / aaa-readme.md
Last active December 3, 2022 00:36
Setting up aws log agent to send journalctl from DC/OS logs to Amazon Log Service

In this example, we are using Centos7, journalctl and systemctl so that we can monitor logs from DC/OS instances (masters, agents and public agents). It is useful for anyone using systemd, journald in an AWS EC2 enviroment that wants logging. The nice thing about Amazon CloudWatch is that it integrates well with Amazon EMR and Amazon Elasticsearch. (For more background on this subject see this article which covers using CloudFormation, Packr, etc. for Immutable Infrastructure to build DC/OS and deploy it to Amazon Web Services.)

We will install journald-cloudwatch-logs. We are going to setup a daemon into systemd that forwards logs to Amazon CloudWatch log streams.

This utility ***journald-cloudwat

@9to5IT
9to5IT / Manage-ADComputers.ps1
Created July 4, 2016 12:06
PowerShell: Cleanup inactive AD computer objects
Import-Module ActiveDirectory
# Set the number of days since last logon
$DaysInactive = 90
$InactiveDate = (Get-Date).Adddays(-($DaysInactive))
#-------------------------------
# FIND INACTIVE COMPUTERS
#-------------------------------
# Below are three options to find inactive computers. Select the one that is most appropriate for your requirements: