Skip to content

Instantly share code, notes, and snippets.

View egordorichev's full-sized avatar
🖊️
Available for hire

Egor Dorichev egordorichev

🖊️
Available for hire
View GitHub Profile
@parse
parse / shell.c
Created May 11, 2011 07:31
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
@fknaopen
fknaopen / func_cut_host.c
Created December 14, 2011 04:24
Using sscanf to get hostname from URL
#include <stdio.h>
#include <string.h>
//-------------------------
// URL INFO
//-------------------------
struct xx_url_t {
char str[1024]; /* URL strings */
};
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)
@texhex
texhex / DatatypeSize.ino
Created October 25, 2012 17:17
Arduino Data types
// Arduino DatatypeSize v2 - Display information about data types used in Arduino
// Created by Michael 'TeX' Hex - http://www.texhex.info/
//
// Full list of all data types:
// http://arduino.cc/en/Reference/HomePage -> Section "Data Types"
//
// Additonal references:
// http://www.arduino.cc/playground/Code/DatatypePractices
// http://arduino.cc/en/Reference/VariableDeclaration
//
@yanofsky
yanofsky / LICENSE
Last active May 4, 2024 08:45
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@coclav
coclav / gist:5760690
Last active March 11, 2019 18:43
Start the animation of a .gif on click. This adds a "start / stop" button below your still image (abc_still.gif / class : img_anim) that will change the .gif to the animated version (abc.gif)
jQuery(".img_anim").after( function() {
// keep ref to the image
var image = this;
// add div container for the link
var $d = jQuery("<div />");
// add link
var $a = jQuery("<a>Start / Stop animation</a>");
@octosteve
octosteve / ImperialMarch.ino
Created October 1, 2013 22:19
Imperial march played on an Arduino with a Piezo Element
int speakerPin = 9;
int length = 70;
String notes[] = {"G4","G4", "G4", "D#4/Eb4", "A#4/Bb4", "G4", "D#4/Eb4","A#4/Bb4", "G4", "D5", "D5", "D5", "D#5/Eb5", "A#4/Bb4", "F#4/Gb4", "D#4/Eb4","A#4/Bb4", "G4", "G5","G4","G4","G5","F#5/Gb5", "F5","E5","D#5/Eb5","E5", "rest", "G4", "rest","C#5/Db5","C5","B4","A#4/Bb4","A4","A#4/Bb4", "rest", "D#4/Eb4", "rest", "F#4/Gb4", "D#4/Eb4","A#4/Bb4", "G4" ,"D#4/Eb4","A#4/Bb4", "G4"};
int beats[] = { 8, 8, 8, 6, 2, 8, 6 , 2 ,16 , 8, 8, 8, 6, 2, 8, 6, 2, 16,8,6,2,8,6,2,2, 2, 2,6,2,2,8,6,2,2,2,2,6,2,2,9,6,2,8,6,2,16 };
int tempo = 50;
void playTone(int tone, int duration) {
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
@rob-murray
rob-murray / add_intellij_launcer
Last active April 10, 2024 15:42
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@jvns
jvns / executing-file.md
Last active August 5, 2023 22:24
What happens when I run ./hello