Skip to content

Instantly share code, notes, and snippets.

View notthetup's full-sized avatar
🔊

Chinmay Pendharkar notthetup

🔊
View GitHub Profile
@CMCDragonkai
CMCDragonkai / socat_early_terminating_server.sh
Last active June 25, 2024 08:53
Socat: HTTP Server that Terminates Early (useful for testing downstream service robustness)
#!/usr/bin/env bash
# change the sleep time appropriately
# this server is persistent
# mix and match with Content-Length and having larger and less content then
# is actually produced
# as well as malformed Chunked Encoding
socat \
-v -d -d \
@bitsnaps
bitsnaps / ZipUnzip.groovy
Last active June 16, 2024 01:14
Zip and UnZip files using Groovy
import java.util.zip.*
String zipFileName = "file.zip"
String inputDir = "logs"
def outputDir = "zip"
//Zip files
ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(zipFileName))
new File(inputDir).eachFile() { file ->
@adeekshith
adeekshith / .git-commit-template.txt
Last active October 20, 2024 21:10 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@radupotop
radupotop / iperf3.service
Last active January 12, 2019 08:04
iperf3.service for systemd
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
User=iperf
ExecStart=/usr/bin/iperf3 -s --logfile /var/log/iperf.log
[Install]
WantedBy=multi-user.target
@chunseoklee
chunseoklee / oneshot.sh
Last active February 20, 2017 17:23
build iotjs for nuttx on stm32f4
#!/bin/bash
# This script assumes that you have all dependencies on Ubuntu 14.04
# It will takes about 10 or more minites due to repo cloning.
#
# ./harmony ----- iotjs
# |
# ---- nuttx
mkdir harmony
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@mojodna
mojodna / README.md
Last active May 17, 2024 12:53
GDAL 2.0 on Amazon Linux
sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
@mahemoff
mahemoff / episode.haml
Created June 24, 2015 08:23
Twitter card meta tags
%meta(name="twitter:card" content="player")
%meta(name="twitter:title" content="#{@episode.safe_title} by #{@series.safe_title}")
%meta(name="twitter:app:name:googleplay" content="Player FM")
%meta(name="twitter:app:id:googleplay" content="fm.player")
%meta(name="twitter:description" content="#{@episode.safe_description}")
%meta(name="twitter:site" content="PlayerFM")
%meta(name="twitter:image" content="#{safe_series_image_url @episode.series}")
-# dev tunnel -> %meta(name="twitter:player" content="https://something-something.ngrok.com#{widget_episode_path series_id: @series.slug, id: @episode.slug}"
)
%meta(name="twitter:player" content="#{Player.routes.base_url}#{widget_episode_path series_id: @series.slug, id: @episode.slug}")
# original post: http://blog.hostonnet.com/uninstall-gui-from-ubuntu-14-04-lts
sudo apt-get purge -y lightdm
sudo shutdown -r now
sudo apt-get clean
sudo apt-get autoclean
apt-get purge -y unity*
sudo apt-get purge -y unity*
sudo apt-get purge -y gnome-*
@rahulg
rahulg / chmow
Created May 8, 2015 02:33
chmod / chown wrapper
#!/usr/bin/env bash
#
# Installation:
# Copy chmow to some directory in your path, like /usr/local/bin
# cd <directory_above>
# chmod 0755 chmow
# ln -s chmow chmod
# ln -s chmow chown
set -e -u