Skip to content

Instantly share code, notes, and snippets.

Avatar

Asaf Fisher AsafFisher

  • IL
View GitHub Profile
View xonsh_aliases_dot_xsh.py
#!/usr/bin/env xonsh
from packaging import version as ver
# Git version checking
git_version = $(git version 2>/dev/null).split()[2]
#
# Functions
#
View mod.rs
macro_rules! concurrent {
(
[ $($pass_rc:ident),* ];$($x:expr);*;
) => {
{
{
$(
let $pass_rc = Arc::new($pass_rc);
let $pass_rc = &$pass_rc.clone();
@AsafFisher
AsafFisher / server.cpp
Created Mar 24, 2018
LOOK AT LINE 70.
View server.cpp
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <string>
#include "FS.h"
using namespace std;
//std::string
char payload[] = "<img src='im.png' height='2000' width='1500'/>";
/* Set these to your desired credentials. */
View gist:9f37c5bebeabea6445929f389e5918e9
import java.util.TreeMap;
public class MyClass {
static TreeMap<Integer, String> a = new TreeMap<Integer, String>();public static void main(String args[]) {a.put(1000, "M");a.put(900, "CM");a.put(500, "D");a.put(400, "CD");a.put(100, "C");a.put(90, "XC");a.put(50, "L");a.put(40, "XL");a.put(10, "X");a.put(9, "IX");a.put(5, "V");a.put(4, "IV");a.put(1, "I");System.out.print(b(44));}static String b(int n){int n1=a.floorKey(n);if(n==n1)return a.get(n);return(a.get(n1) + b(n-n1));}
}
View gist:41609280775d29442f53b7088cd1d61b
/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQA
AAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAE16ADAAQAAAABAAAE2gAAAAD/7QA4
UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AA
EQgE2gTXAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIB
AwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBka
JSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SV
lpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX2
9/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAEC
dwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4
OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWm
View gist:ae99fa1b71fed87ee689bbaf2274915d
#ifndef STARTIF
#include <string.h>
typedef union Word{
/*Binary structure: 15 bits basic cell*/
struct{
unsigned int cell:15;
}fullword;
/*Binary structure: |DUMY|GRP|OPCODE|SRCAR|DESTAR|ERA|*/
View gist:769006f1d889daadf0d095af747da44d
In file included from /home/asaf/GitHub/Assembler/lineparser.c:6:0:
/home/asaf/GitHub/Assembler/protocols.h:3:15: error: redefinition of ‘union Word’
typedef union Word{
^
In file included from /home/asaf/GitHub/Assembler/lineparser.h:1:0,
from /home/asaf/GitHub/Assembler/lineparser.c:5:
/home/asaf/GitHub/Assembler/protocols.h:3:15: note: originally defined here
typedef union Word{
^