Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile
@rasheedamir
rasheedamir / README.md
Created October 26, 2015 15:00 — forked from digital-wonderland/README.md
Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet
@rasheedamir
rasheedamir / uber-install-213.sh
Created October 19, 2015 19:16 — forked from dannguyen/uber-install-213.sh
Make everything install on Ubuntu 14.04 and 14.10, specifically for AWS and DigitalOcean
## Tested on 14.04 and 14.10. Runs as root because why not
## Installs:
# - Ubuntu developer tools
# - Python (using system 2.7.6 / 2.7.8)
# - scipy libs
# - scikit-learn
# - nltk
# - Ruby 2.1.5
# - rbenv
# - nokogiri
@rasheedamir
rasheedamir / Linux Commands.MD
Last active September 15, 2015 07:37
Linux Commands
  1. Sort files by date & time: ls -halt

  2. Nano go to the end of the file: Ctrl + w + v

  3. Nano "Ctrl + w" to find the text and then press enter to search the it

@rasheedamir
rasheedamir / FindFps.java
Created September 8, 2015 10:06
find fps - frames per second
String query = "ffmpeg -i foo.avi 2>&1 | sed -n 's/.*, \\(.*\\) fp.*/\\1/p' > fps.txt";
String[] command = {"gnome-terminal", "-x", "/bin/sh", "-c", query};
Process process = Runtime.getRuntime().exec(command);
process.waitFor();
Thread.sleep(2000);
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("fps.txt")));
output = br.readLine();
} catch (IOException ioe) {
ioe.printStackTrace();
@rasheedamir
rasheedamir / MockServer Proxy Error
Created August 31, 2015 14:09
MockServer Proxy Error
aurora@1d7a129656b2:/opt/mockserver$ ./run_mockserver.sh -logLevel INFO -serverPort 1080 -proxyPort 1090 -proxyRemotePort 80 -proxyRemoteHost https://wamsdubclus001rest-hs.cloudapp.net
=========================================================================================================================================================================================================================================================
Executing command: java -Dfile.encoding=UTF-8 -Dmockserver.logLevel=INFO -jar /opt/mockserver/mockserver-netty-jar-with-dependencies.jar -serverPort 1080 -proxyPort 1090 -proxyRemotePort 80 -proxyRemoteHost https://wamsdubclus001rest-hs.cloudapp.net
=========================================================================================================================================================================================================================================================
2015-08-31 14:08:23,352 INFO o.m.m.MockServer MockServer started on port: 1080
2015-08-
@rasheedamir
rasheedamir / keyframes.json
Created July 15, 2015 14:24
keyframes.json
This file has been truncated, but you can view the full file.
{
"frames": [
{
"media_type": "video",
"key_frame": 1,
"pkt_pts": 2070,
"pkt_pts_time": "0.023000 s",
"pkt_dts": 2070,
"pkt_dts_time": "0.023000 s",
"best_effort_timestamp": 2070,
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
# Allow remote debugger connections (Default port is 6666)
Mule-3.4$ bin/mule -M-Dmule.debug.enable=true
# Change debugger port
Mule-3.4$ bin/mule -M-Dmule.debug.enable=true -M-Dmule.debug.port=8888
# Disable timeouts
Mule-3.4$ bin/mule -M-Dmule.debug.enable=true -M-Dmule.timeout.disable=true
@rasheedamir
rasheedamir / docker-grails-mysql-startup-failure.md
Created May 21, 2015 06:17
docker-grails-mysql-startup-failure
2015-05-20 21:45:31,921 [localhost-startStop-1] INFO  (grails.plugin.cache.CacheBeanPostProcessor) - postProcessBeanDefinitionRegistry start
2015-05-20 21:45:31,922 [localhost-startStop-1] INFO  (grails.plugin.cache.CacheBeanPostProcessor) - postProcessBeanFactory
2015-05-20 21:45:32,191 [localhost-startStop-1] ERROR (org.codehaus.groovy.grails.web.context.GrailsContextLoader) - Error initializing the application: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.Bea
@rasheedamir
rasheedamir / command.txt
Last active August 29, 2015 14:20 — forked from nrk/command.txt
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"