Skip to content

Instantly share code, notes, and snippets.

View jcmvbkbc's full-sized avatar

Max Filippov jcmvbkbc

View GitHub Profile
@jcmvbkbc
jcmvbkbc / dhcpd.conf
Created September 26, 2014 16:58
gpxelinux config files
ddns-update-style interim;
ignore client-updates;
subnet 192.168.10.0 netmask 255.255.255.0 {
option routers 192.168.10.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.248.21;
option ntp-servers 192.168.0.1;
.data
.Lfmt:
.asciz ">>> 0x%08x -> 0x%08x: called from IRQ (or with interrupts disabled)\n"
.text
.global _mcount
.align 4
.literal_position
.align 4
_mcount:
movi a11, 0x40200000
@jcmvbkbc
jcmvbkbc / fst.c
Last active December 20, 2015 19:09
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>
#include <malloc.h>
#include <unistd.h>
struct FstHdr {
uint32_t signature;
uint32_t width;
#include <inttypes.h>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#ifndef FREQ
#define FREQ 44100
#endif
#ifndef CHANNELS
if ENABLE_FOO
include $(srcdir)/Makefile.foo.include
endif
ipv6: ipv6.c
// ==UserScript==
// @name drop lj promo
// @namespace jcmvbkbc
// @include https://*.livejournal.com/friends*
// @include https://www.livejournal.com/
// @version 1
// @run-at document-idle
// @grant none
// ==/UserScript==
@jcmvbkbc
jcmvbkbc / Makefile
Last active March 29, 2021 07:45
Makefile for ESP8266 that can build both C and C++
# tnx to mamalala
# Changelog
# Changed the variables to include the header file directory
# Added global var for the XTENSA tool root
#
# This make file still needs some work.
#
# Updated for SDK 0.9.2
#
# Output directors to store intermediate compiled files
@jcmvbkbc
jcmvbkbc / h.c
Last active May 23, 2021 15:51
Hanoi towers with unsorted source.
#include <algorithm>
#include <cassert>
#include <climits>
#include <cstdio>
#include <deque>
typedef std::deque<int> stack;
void move_top1(stack& from, stack& to, stack& spare);
int top(const stack& o)
@jcmvbkbc
jcmvbkbc / fix-repo-version
Created May 10, 2018 22:16
Script for repo project version fixing ( repo forall -c fix-repo-version `pwd`/.repo/manifests/default.xml )
#! /bin/bash -ex
if [ $# -gt 0 ] ; then name="$1"
else name=".repo/manifests/default.xml" ; fi
sed -i "$name" -e "\\,name=\"$REPO_PROJECT\",s, *revision=\"[^\"]*\",,g"
sed -i "$name" -e "\\,name=\"$REPO_PROJECT\",s,/>,revision=\"$REPO_LREV\" />,g"