Skip to content

Instantly share code, notes, and snippets.

@1242035
1242035 / AdvancedAudioSynthesisDemoActivity.java
Created October 27, 2016 15:40 — forked from MasterEx/AdvancedAudioSynthesisDemoActivity.java
Audio Synthesis with android AudioTrack - 1
package pntanasis.master_ex.android;
import pntanasis.master_ex.android.Synthesizer.Note0;
import android.app.Activity;
import android.os.Bundle;
public class AudioSynthesisDemoActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
@1242035
1242035 / clone.sh
Last active March 16, 2019 03:31
Get all repositories under a user from bitbucket
#!/bin/bash
#Script to get all repositories under a user from bitbucket
#Origin: https://haroldsoh.com/2011/10/07/clone-all-repos-from-a-bitbucket-source/
#Usage: ./clone.sh [username] [password]
curl -u ${1}:${2} https://api.bitbucket.org/1.0/users/${1} > repoinfo
for repo_name in `cat repoinfo | sed -r 's/("name": )/\n\1/g' | sed -r 's/"name": "(.*)"/\1/' | sed -e 's/{//' | cut -f1 -d\" | tr '\n' ' '`
do
echo "Cloning: " $repo_name
git clone https://${1}:${2}@bitbucket.org/${1}/$repo_name".git"
<object width="640" height="360">
<param name="movie" value="http://www.youtube.com/embed/OcV0cbQJ5r8?html5=1&amp;rel=0&amp;hl=en_US&amp;version=3"/>
<param name="allowFullScreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<embed width="640" height="360" src="http://www.youtube.com/embed/OcV0cbQJ5r8?html5=1&amp;rel=0&amp;hl=en_US&amp;version=3" class="youtube-player" type="text/html" allowscriptaccess="always" allowfullscreen="true"/>
</object>
@1242035
1242035 / install-opencv.sh
Last active May 26, 2017 06:34
Bash Install Opencv On Ubuntu
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |----------------------------------------------------|
# | OS | OpenCV | Test | Last test |
# |----------------|--------------|------|-------------|
# | Ubuntu 16.04.2 | OpenCV 3.2.0 | OK | 20 May 2017 |
# | Debian 8.8 | OpenCV 3.2.0 | OK | 20 May 2017 |
@1242035
1242035 / widget.js
Created August 1, 2017 16:51 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
<div id="columns">
<figure>
<img src="//s3-us-west-2.amazonaws.com/s.cdpn.io/4273/cinderella.jpg">
<figcaption>Cinderella wearing European fashion of the mid-1860’s</figcaption>
</figure>
<figure>
<img src="//s3-us-west-2.amazonaws.com/s.cdpn.io/4273/rapunzel.jpg">
<figcaption>Rapunzel, clothed in 1820’s period fashion</figcaption>
</figure>
https://support.microsoft.com/en-us/help/17145/windows-homegroup-from-start-to-finish
What's a homegroup?
A homegroup is a group of PCs on a home network that can share files and printers. Using a homegroup makes sharing easier. You can share pictures, music, videos, documents, and printers with other people in your homegroup.
You can help protect your homegroup with a password, which you can change at any time. Other people can't change the files that you share unless you give them permission to do so.
After you create or join a homegroup, you select the libraries (for example, My Pictures or My Documents) that you want to share. You can prevent specific files or folders from being shared, and you can share additional libraries later.
@1242035
1242035 / nginx.conf
Created August 10, 2017 19:29 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
Source: https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
This page collects hints how to improve the security of nginx web servers running on Linux or UNIX-like operating systems.
Default Config Files and Nginx Port
/usr/local/nginx/conf/ or /etc/nginx/– The nginx server configuration directory and /usr/local/nginx/conf/nginx.conf is main configuration file.
/usr/local/nginx/html/ or /var/www/html– The default document location.
/usr/local/nginx/logs/ or /var/log/nginx – The default log file location.
Nginx HTTP default port : TCP 80