Skip to content

Instantly share code, notes, and snippets.

View Vlaaaaaaad's full-sized avatar

Vlad Ionescu Vlaaaaaaad

View GitHub Profile
@kcwinner
kcwinner / app.py
Last active October 13, 2023 04:59
Call AppSync GraphQL from Python Lambda Function
from lib import appsync
def lambda_handler(event, context):
print(event)
input = {
'name': 'test123',
'description': 'some cool description'
}
@ceejbot
ceejbot / deploy.yml
Last active August 11, 2021 16:03
Using Honeycomb's buildevents tool inside a github action
name: deploy service tar
on:
push:
branches:
- 'deploy/*'
jobs:
docker:
name: Build and archive service
runs-on: ubuntu-latest
@eanakashima
eanakashima / main.go
Last active September 23, 2020 16:19
Send AWS Cost & Usage reports to Honeycomb
package main
import (
"bytes"
"encoding/csv"
"fmt"
"io"
"io/ioutil"
"log"
"os"
@benkehoe
benkehoe / aws.opml
Last active May 20, 2024 10:51
AWS RSS feeds
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AWS RSS feeds 2019-04-22</title>
</head>
<body>
<outline text="AWS" title="AWS">
<outline type="rss" text="Infrastructure &amp; Automation" title="Infrastructure &amp; Automation" xmlUrl="https://aws.amazon.com/blogs/infrastructure-and-automation/feed/" htmlUrl="https://aws.amazon.com/blogs/infrastructure-and-automation/"/>
<outline type="rss" text="AWS Developer Blog" title="AWS Developer Blog" xmlUrl="http://feeds.feedburner.com/AwsDeveloperBlog" htmlUrl="https://aws.amazon.com/blogs/developer/"/>
@daliborgogic
daliborgogic / main.css
Last active March 17, 2023 22:14
Dynamic Metrics Inter font postcss
/* css variables does't work in math... */
/* using postcss-simple-vars */
$a: -0.0223;
$b: 0.185;
$c: -0.1745;
$lineHeight: 1.4;
$fontSize: 16;
@import url('https://rsms.me/inter/inter.css');
@koladilip
koladilip / aws-cognito-refresh-tokens-from-brower.js
Last active August 22, 2023 20:13
Code for refreshing AWS Cognito user pool tokens using refresh token from browser.
fetch("https://cognito-idp.<cognito-user-pool-region>.amazonaws.com/", {
headers: {
"X-Amz-Target": "AWSCognitoIdentityProviderService.InitiateAuth",
"Content-Type": "application/x-amz-json-1.1",
},
mode: 'cors',
cache: 'no-cache',
method: 'POST',
body: JSON.stringify({
ClientId: "<cognito-user-pool-client-id>",
@RichardBronosky
RichardBronosky / touchid_sudo.sh
Last active April 18, 2024 03:17
Use TouchID for sudo on modern MacBook Pro machines
#!/bin/bash
# curl -sL https://gist.githubusercontent.com/RichardBronosky/31660eb4b0f0ba5e673b9bc3c9148a70/raw/touchid_sudo.sh | bash
# This script is ready to copy-paste in whole, or just the line above (without the leading #)
# Use TouchID for sudo on modern MacBook Pro machines
# This script adds a single line to the top of the PAM configuration for sudo
# See: https://apple.stackexchange.com/q/259093/41827 for more info.
touchid_sudo(){
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@molszanski
molszanski / Makefile
Last active November 19, 2021 16:46
Makefile example for frontend dev
bin = ./node_modules/.bin
# (spec, dot, progress, tap, landing, nyan, min (mocha --reporters))
REPORTER = spec
build-prod: ## Build a clean prod versions
@ NODE_ENV=develop \
$(bin)/webpack --config ./build/config-webpack-dist.coffee
@ cp ./assets/favicon.ico ./dist/favicon.ico
@ivan-pinatti
ivan-pinatti / jenkins-create-job-scm-flow.groovy
Last active February 17, 2022 07:46
Jenkins - Create a Jenkins job via groovy script that; cleans before checkout, shallow clone, sparse checkout only the Jenkinsfile and set lightweight - #jenkins #groovy #jenkins-job #jenkins-git #git #jenkinsfile
#!groovy
// imports
import hudson.plugins.git.*
import hudson.plugins.git.extensions.*
import hudson.plugins.git.extensions.impl.*
import jenkins.model.Jenkins
// parameters
def jobParameters = [