Skip to content

Instantly share code, notes, and snippets.

View fxfactorial's full-sized avatar
🎯
Focusing

@edgararout fxfactorial

🎯
Focusing
View GitHub Profile
@fxfactorial
fxfactorial / Gnuplot from C, gif
Created December 11, 2014 20:28
How to make a smooth gif animation?
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <sys/mman.h>
#include "perceptron.h"
double dot_product(float *a, float *b, int len)
(setq password-cache-expiry nil)
(load-file "~/.emacs.d/cedet/cedet-devel-load.elc")
(require 'semantic/senator)
(require 'semantic/ia)
(require 'semantic/analyze/refs)
(require 'semantic/analyze/complete)
(require 'semantic/bovine/gcc)
(require 'semantic/mru-bookmark)
(require 'semantic)
(global-semantic-idle-scheduler-mode 1)
(global-semantic-decoration-mode 1)
(defun os-s ()
"Only way to get semantic to play nicely with desired files,
very strange, *remember* to add the trailing slash for directories."
(interactive)
(setq company-c-headers-path-system '("/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/arch/arm/include/"
"/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/include/"))
(setq company-c-headers-path-user '(" /ssh:os:/home/w4118/hmwk6-prog/flo-kernel/include/"))
(semantic-reset-system-include)
(setq semantic-dependency-include-path '("/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/kernel/"))
(semantic-add-system-include "/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/arch/arm/include/")
@fxfactorial
fxfactorial / c_text.ml
Last active November 10, 2015 16:53
Use node and node packages, like npm's color.js, from OCaml
let () =
let styled =
Colors_js.colorize ~msg:"Hello World"
~styles:Colors_js.([Blue; Underline; White_bg])
[]
in
let with_actions =
Colors_js.colorize ~msg:"Foo Bar Baz" ~styles:[] [Colors_js.America]
in
print_endline styled;
@fxfactorial
fxfactorial / build.sh
Created November 27, 2015 07:53 — forked from c0ming/build.sh
A script for build iOS7 universal static library with clang
#!/bin/bash
# e.g. libmms http://sourceforge.net/projects/libmms/
# set -x
BUILD_DIR=`pwd`"/build"
STATIC_LIB_NAME="libmms.a"
STATIC_LIB_NAME_ARM="libmms.a.arm"
STATIC_LIB_NAME_X86="libmms.a.x86"
@fxfactorial
fxfactorial / ocaml_presentation.html
Last active January 19, 2016 07:12
OCaml presentation, download this one file and open in any browser.
<!doctype html>
<html lang="en">
<!--
The MIT License (MIT)
Copyright (c) 2015 Tom Panning
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@fxfactorial
fxfactorial / SVN_Git_Mirror.md
Created January 27, 2016 08:06 — forked from ticean/SVN_Git_Mirror.md
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@fxfactorial
fxfactorial / build.sh
Created February 4, 2016 09:58 — forked from zhuowei/build.sh
Crashing Android Debuggerd on Nexus 6P with CVE-2016-0807
arm-linux-androideabi-gcc -pie -Wl,--build-id=0x`perl -e 'print "41"x4096'` --sysroot /home/zhuowei/android/prebuilts/ndk/9/platforms/android-9/arch-arm c.c
@fxfactorial
fxfactorial / re-sign-ios-app.md
Created February 12, 2016 12:17 — forked from chaitanyagupta/re-sign-ios-app.md
How to re-sign an iOS app with another developer account

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

  1. Unzip the .ipa. This will usually unzip to Payload/.app/