Skip to content

Instantly share code, notes, and snippets.

View ManasJayanth's full-sized avatar

prometheansacrifice ManasJayanth

View GitHub Profile
@ManasJayanth
ManasJayanth / Emacs.md
Created March 18, 2019 10:27 — forked from redinger/Emacs.md
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

@ManasJayanth
ManasJayanth / codesign_gdb.md
Created January 25, 2019 05:57 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX

Note: these instructions are for pre-Sierra MacOS. Sierra Users: see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
@ManasJayanth
ManasJayanth / traceback
Created November 28, 2018 05:41
Cerbero arch linux traceback
Traceback (most recent call last):
File "/home/manas/development/cerbero/cerbero/main.py", line 110, in run_command
res = commands.run(command, self.config, self.args)
File "/home/manas/development/cerbero/cerbero/commands/__init__.py", line 78, in run
return _commands[command].run(config, args)
File "/home/manas/development/cerbero/cerbero/commands/package.py", line 84, in run
pkg = Packager(config, p, self.store)
File "/home/manas/development/cerbero/cerbero/packages/packager.py", line 41, in __new__
raise FatalError(_("No packager available for the distro %s" % d))
cerbero.errors.FatalError: Fatal Error: No packager available for the distro arch
@ManasJayanth
ManasJayanth / clip.c
Created November 27, 2018 13:27
Interpolation of values in effects
#include <ges/ges.h>
#include <string.h>
#include <stdlib.h>
char input_file[256], output_file[256];
void
control_binding_added_handler (GESTrackElement *track_element,
GstControlBinding *control_binding,
@ManasJayanth
ManasJayanth / text.c
Last active November 23, 2018 11:35
Agingtv works but text doesnt
#include <ges/ges.h>
#define MAX_GES_LAYERS 100
GESTimeline* prepare_ges_timeline(const GESLayer **layers, int n_layers);
GESPipeline* prepare_ges_pipeline(GESTimeline* timeline, gboolean preview);
int run_ges_pipeline(GESPipeline *pipeline, gdouble duration, gboolean preview);
@ManasJayanth
ManasJayanth / script.js
Created August 7, 2018 16:17
GCC-medium-1
(function() {
let imdb = 8;
let rottenTomatoes = 9;
console.log('The Dark Knight (rating)', (imdb + rottenTomatoes) / 2);
}())
@ManasJayanth
ManasJayanth / script.js
Created July 27, 2018 06:33
Debalina - zipcode search with tries
const root = document.getElementById('root');
class TrieNode{
constructor(c) {
this.key = c;
this.parent = null;
this.children = {}; // Hash mapping character to next level
this.end = false; // End of node
this.data = null
}
import ReactReconciler from 'react-reconciler';
const hostConfig = {
getRootHostContext(rootContainerInstance) {
return {}
},
getChildHostContext(parentHostContext, type, rootContainerInstance) {
return {};
},
commitUpdate(
domElement,
updatePayload,
type,
oldProps,
newProps,
internalInstanceHandle
) {
updatePayload.forEach(update => {
Object.keys(update).forEach(key => {
prepareUpdate(
domElement,
type,
oldProps,
newProps,
rootContainerInstance,
hostContext
) {
const propKeys = new Set(
Object.keys(newProps).concat(