Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Filippov jcmvbkbc

  • Fremont, CA
View GitHub Profile
View gist:a7de72e719c619ac82b3da8b1eedb5de
// ==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 / rebuild-kernels.sh
Created Jul 11, 2018
android kernel/emulator tools
View rebuild-kernels.sh
#! /bin/bash -ex
# VER=3.18|4.4|4.9 ./rebuild-kernels
declare -A defconfig
declare -A cross
defconfig=([arm64]="ranchu64_defconfig" [x86_64]="x86_64_ranchu_defconfig")
cross=([arm64]="aarch64-linux-gnu-" [x86_64]="x86_64-linux-gnu-")
for check in 0 1 ; do
@jcmvbkbc
jcmvbkbc / fix-repo-version
Created May 10, 2018
Script for repo project version fixing ( repo forall -c fix-repo-version `pwd`/.repo/manifests/default.xml )
View fix-repo-version
#! /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"
View Makefile.am
if ENABLE_FOO
include $(srcdir)/Makefile.foo.include
endif
View sintables.c
#include <inttypes.h>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#ifndef FREQ
#define FREQ 44100
#endif
#ifndef CHANNELS
View irq_check.s
.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 / Makefile
Last active May 23, 2019
Makefile for ESP8266 that can build both C and C++
View Makefile
# 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 / dhcpd.conf
Created Sep 26, 2014
gpxelinux config files
View dhcpd.conf
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;
@jcmvbkbc
jcmvbkbc / h.c
Last active Dec 13, 2018
Hanoi towers with unsorted source.
View h.c
#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)
You can’t perform that action at this time.