Skip to content

Instantly share code, notes, and snippets.

View legitYosal's full-sized avatar
🥭
Internally fused

yosef sl legitYosal

🥭
Internally fused
View GitHub Profile
# macOS xargs has no -d (delimiter) option. But you can use BASH to do something similar :
cat myfile.txt | grep \n | while read -r line ; do echo "$line"; done
var Student = new Array();
$(document).ready(function(){
$.ajax({
url: "http://localhost/public_html/Final_project/student_2017.php",
method:"GET",
success:function (data) {
console.log(data);
for(i in data){
Student.push(data[i]);
@FUSAKLA
FUSAKLA / debugging-slow-grafana-dashboard.md
Last active May 10, 2025 15:14
Speeding up Grafana dashboard

Intro

So your dashboard is slow? We are doing our best but maybe it's time to think if the issue isn't on your side.

Some of our dashboards looks like https://www.theworldsworstwebsiteever.com/. Are you sure you really need to see all the time all the data? Or do you really need to see data for last week or month all the time? How often do you use filtering by some of those variables in your dashboard?

Let's not end up as your mother saying:

But.. but.. I might need this in future so let's leave this icon on the Desktop.

@alirezanet
alirezanet / Iran96-97.json
Last active February 5, 2025 21:43
List of provinces, states and cities of Iran with geographical coordinates (96-97 update)
[
{
"latitude": "34° 31' 24.924",
"longitude": "50° 0' 20.866",
"province": "مرکزی",
"state": "آشتیان",
"city": "آشتیان"
},
{
"latitude": "33° 40' 29.197",
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 30, 2025 12:33
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@mafoti
mafoti / doubleAuction.sol
Last active May 25, 2024 10:50
Uniform Price Double Auction Smart Contract, implemented in Solidity
pragma solidity ^0.4.19;
contract DoubleAuction {
address public market;
mapping(int => int) consumptionBids;
int[] _consumptionPrices;
mapping(int => int) generationBids;
int[] _generationPrices;
Clearing public clearing;
@njanakiev
njanakiev / overpass_api_recipes.md
Last active October 8, 2024 14:57
Overpass API Recipes

Overpass API Recipes

Get all the peaks in the dolomites

area
  [place=region]
  ["region:type"="mountain_area"]
  ["name:en"="Dolomites"];
out body;
# From @andyhky (http://virtualandy.wordpress.com)
# Upgrading OVS is discussed at length here: http://wp.me/pp5B3-aZ
---
- name: Upgrade OVS
hosts: "*"
gather_facts: false
connection: ssh
user: root
tasks: