Skip to content

Instantly share code, notes, and snippets.

View r9y9's full-sized avatar
:shipit:
( ˘ω˘ ) zzz

Ryuichi Yamamoto r9y9

:shipit:
( ˘ω˘ ) zzz
View GitHub Profile
@xavierd
xavierd / complete.cc
Created December 29, 2010 15:20
Hacking with libclang completion.
#include <clang-c/Index.h>
#include <cstdlib>
#include <iostream>
/*
* Compile with:
* g++ complete.cc -o complete -lclang -L/usr/lib/llvm
* Run with:
* LIBCLANG_TIMING=1 ./complete file.cc line column [clang args...]
*/
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html
@gwtaylor
gwtaylor / crbm.py
Last active August 9, 2022 15:13
Theano CRBM demonstration
""" Theano CRBM implementation.
For details, see:
Taylor GW, Hinton GE, Roweis ST. Modeling Human Motion Using Binary Latent Variables.
In: Advances in Neural Information Processing Systems 19. MIT Press; 2007. pp. 1345–1352.
Sample data:
https://uoguelphca-my.sharepoint.com/:u:/g/personal/gwtaylor_uoguelph_ca/EfJARkZuiX1JmwMKQxQqKJMBaMBUNOcF83FW_n9gk7OIbg?e=fnCjet
@author Graham Taylor"""
import numpy
@certik
certik / compile_run.sh
Last active February 23, 2023 22:50
Test offscreen rendering with VTK 6
#! /bin/bash
set -e
g++ -o test_offscreen.o -c test_offscreen.cpp -I$PYTHONHPC/include/vtk-6.0
g++ -o test_offscreen test_offscreen.o $PYTHONHPC/lib/libvtk*.so
LD_LIBRARY_PATH=$PYTHONHPC/lib/ ./test_offscreen
@mmohiudd
mmohiudd / facebook-batchcall.php
Created May 8, 2014 22:21
Batch call with facebook-php-sdk-v4
<?php
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\GraphUser;
use Facebook\FacebookRequestException;
FacebookSession::setDefaultApplication('YOUR_APP_ID','YOUR_APP_SECRET');
// Use one of the helper classes to get a FacebookSession object.
// FacebookRedirectLoginHelper
@maxim
maxim / task.yml
Created June 12, 2014 11:09
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
@alloy
alloy / README.markdown
Created August 8, 2014 09:56
Learn the LLVM C++ API by example.

The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c sample by using LLVM:

$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp
@steve-jansen
steve-jansen / README.md
Last active February 23, 2024 22:38
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@jfsantos
jfsantos / AudioDisplay.jl
Created November 4, 2014 01:10
Rendering audio in IJulia notebooks
using WAV
function inline_audioplayer(filepath)
markup = """<audio controls="controls" {autoplay}>
<source src="$filepath" />
Your browser does not support the audio element.
</audio>"""
display(MIME("text/html") ,markup)
end