Skip to content

Instantly share code, notes, and snippets.

View rredpoppy's full-sized avatar

Adrian Rosian rredpoppy

View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@rredpoppy
rredpoppy / core.clj
Created September 25, 2015 20:28 — forked from pitluga/core.clj
Braintree Clojure Example
(ns braintree-clj.core
(:import [com.braintreegateway BraintreeGateway Environment TransactionRequest Transaction$Type])
(:require [clojure.string :as s]
[hiccup.core :as hiccup]
[hiccup.page-helpers :as page-helper]
[noir.core :as noir]
[noir.request :as noir-req]
@rredpoppy
rredpoppy / alsa-info.sh
Created March 5, 2016 09:17 — forked from anonymous/alsa-info.sh
Alsa Information
[adrian@localhost ~]$ cat /tmp/alsa-info.txt.LwuI5O5q82
upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################
!!Script ran on: Sat Mar 5 09:11:29 UTC 2016
!!Linux Distribution
@rredpoppy
rredpoppy / hellocv.scala
Created November 4, 2016 06:28 — forked from kamiyaowl/hellocv.scala
scala + opencv with sbt
$sudo apt-get install libopencv-dev
$mkdir hellocv
$cd hellocv
$mkdir lib
#get opencv-2XX.jar and copy into hellocv/lib
#sudo dpkg -L libopencv-dev
$cp /usr/share/OpenCV/java/opencv-248.jar lib/
$sbt run
@rredpoppy
rredpoppy / index.js
Created November 28, 2016 08:59 — forked from davidguttman/index.js
Bootstrap and Browserify
// Bootstrap wants jQuery global =(
window.jQuery = $ = require('jquery')
// Bootstrap doesn't have a "main" field / export anything =(
var bootstrap = require('bootstrap/dist/js/bootstrap')
// Get Bootstrap styles with cssify
var style = require('./node_modules/bootstrap/dist/css/bootstrap.css')
var popover = document.createElement('span')
popover.innerHTML = 'I have a popover'
@rredpoppy
rredpoppy / 00_destructuring.md
Created February 9, 2017 07:42 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

@rredpoppy
rredpoppy / install.sh
Created February 19, 2017 09:18 — forked from younes200/install.sh
UV4L + Webrtc
curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add -
sudo vi /etc/apt/sources.list
cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
sudo apt-get update
sudo apt-get install uv4l-webrtc
sudo apt-get install uv4l-raspicam-extras
sudo service uv4l_raspicam restart
@rredpoppy
rredpoppy / AidaClient.java
Created February 23, 2017 09:51
Aida client
package aidaclient;
import com.sun.xml.internal.ws.developer.WSBindingProvider;
import com.whitecitycode.aida.*;
import java.util.List;
/**
*
* @author adrian
*/
@rredpoppy
rredpoppy / uri.js
Created March 13, 2017 15:36 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@rredpoppy
rredpoppy / Main.java
Created September 1, 2017 23:11
BouncyCastle AES 256 CBC Java <-> Js
/*
* Unrestricted security policy files for Java JRE need to be installed from Oracle for 256 keys to work
*/
package com.mycompany.mavenproject1;
import java.security.SecureRandom;
import java.security.Security;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;