Skip to content

Instantly share code, notes, and snippets.

View alikrc's full-sized avatar

Ali alikrc

View GitHub Profile
@jgoodall
jgoodall / README.md
Last active September 19, 2023 18:06
This is a sample of how to send some information to logstash via the TCP input from node.js or python.

This is a sample of how to send some information to logstash via the TCP input in nodejs or python. It assumes the logstash host is on 10.10.10.100 and the TCP listening input is 9563.

The logstash.conf should look something like the sample file.

The log message should be a stringified JSON object with the log message in the @message field.

To use, run the node script node sendMessageToLogstash.js, or the python script python sendMessageToLogstash.js

@daniellevass
daniellevass / android_material_design_colours.xml
Last active June 5, 2024 13:54
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@bryanbarnard
bryanbarnard / sample_restmessagev2.js
Created July 2, 2015 14:57
Sample RESTMessageV2 Parse JSON Response
// NOTE: this sample was run in a ServiceNow instance running release version Fuji Patch 4
(function sampleRequest() {
try {
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('get');
request.setEndpoint('https://rawgit.com/anonymous/f1c4664cafd6caf855fd/raw/f7ca3b022045e2c9f49dd2b453dea0cecc09888c/sample_json.json');
var response = request.execute();
var httpResponseStatus = response.getStatusCode();

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@ZWMiller
ZWMiller / streamAudio.py
Created June 19, 2017 16:36
Using Python to plot the current microphone's input and the Fourier Transform
try:
import pyaudio
import numpy as np
import pylab
import matplotlib.pyplot as plt
from scipy.io import wavfile
import time
import sys
import seaborn as sns
except:
@Rachniotov
Rachniotov / README.md
Last active September 6, 2022 09:50
Darkmode for Mongodb Compass!

Introduction

So I used Mongodb Compass for a little time a few months ago and then i switched to another mongo client gui for the sole reason, Darkmode. That mongo client was good but recently it became paid. I then switched back to Compass but my eyes couldnt take it 😩

Then I spent some time researching what could I do to make compass darker and easier to read and I found this npm package for the Darkreader chrome plugin. I knew that compass was made in Electron as it had .asar files in its source, that means I could easily implemt that npm package into the Electron app.