Skip to content

Instantly share code, notes, and snippets.

@hlippek
hlippek / basic_scheduler.c
Created July 27, 2012 11:58
Implementation of a basic task scheduler
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_PROCESSES 32 /* the maximal number of processes in the system */
#define MAX_NAME_LEN 32
/* Process control block -
* holding all process relevant informations
*/
@0xjac
0xjac / private_fork.md
Last active April 28, 2024 15:01
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@WarningImHack3r
WarningImHack3r / ScreenSize.svelte
Created April 11, 2024 18:48
ScreenSize Tailwind component for Svelte
<script>
// Made by https://github.com/WarningImHack3r
// Inspired by https://gist.github.com/Sh4yy/0300299ae60af4910bcb341703946330
let width = 0;
let height = 0;
</script>
<svelte:window bind:innerWidth={width} bind:innerHeight={height} />
<div
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 14:58
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@ismailh
ismailh / ghlicense
Last active April 28, 2024 14:57 — forked from Vsnumimmy/ghlicense
Please don't Buy from any one.
if you buy you will scammed.
if you need license please contact : help@e.lic.click
Must Remember Dlicense is no more.
#!/usr/bin/php
<?php
@endrsmar
endrsmar / index.ts
Created January 9, 2024 12:11
Raydium new pool listener
import { LiquidityPoolKeysV4, MARKET_STATE_LAYOUT_V3, Market, TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk";
import { Connection, Logs, ParsedInnerInstruction, ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstruction, PublicKey } from "@solana/web3.js";
const RPC_ENDPOINT = 'https://api.mainnet-beta.solana.com';
const RAYDIUM_POOL_V4_PROGRAM_ID = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8';
const SERUM_OPENBOOK_PROGRAM_ID = 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX';
const SOL_MINT = 'So11111111111111111111111111111111111111112';
const SOL_DECIMALS = 9;
const connection = new Connection(RPC_ENDPOINT);
@mgao6767
mgao6767 / Calculate Institutional Ownership, Concentration, and Breadth Ratios.sas
Created January 24, 2019 05:19
Calculate Institutional Ownership, Concentration, and Breadth Ratios
/* ********************************************************************************* */
/* ************** W R D S R E S E A R C H A P P L I C A T I O N S ************** */
/* ********************************************************************************* */
/* Summary : Calculate Institutional Ownership, Concentration, and Breadth Ratios */
/* Date : May 18, 2009 */
/* Author : Luis Palacios, Rabih Moussawi, and Denys Glushkov */
/* Variables : - INPUT : Thomson-Reuters 13F Data (TR-13F) S34TYPE3 Holdings data */
/* S34TYPE1 data for FDATE and RDATE variables */
/* - OUTPUT: IO_TimeSeries dataset with IO variables for common stocks */
/* ********************************************************************************* */
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active April 28, 2024 14:54
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@miminas
miminas / ical-subscriptions-GR.md
Last active April 28, 2024 14:54
ical-subscriptions-GR