Skip to content

Instantly share code, notes, and snippets.

View boycaught's full-sized avatar
🏠
Working from home!

.LAG boycaught

🏠
Working from home!
View GitHub Profile
@boycaught
boycaught / 3d-carousel-materialize.markdown
Created March 10, 2024 08:10
3d carousel materialize
@boycaught
boycaught / bootstrap-carousel-slider.markdown
Created March 10, 2024 03:13
Bootstrap Carousel Slider
### Keybase proof
I hereby claim:
* I am boycaught on github.
* I am boycaught (https://keybase.io/boycaught) on keybase.
* I have a public key whose fingerprint is C8C4 344C B6E3 FB5E 1258 7F82 B803 4D70 F4AF 1C97
To claim this, I am signing this object:
@boycaught
boycaught / node-and-npm-in-30-seconds.sh
Last active September 6, 2015 03:45 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@boycaught
boycaught / youtube-dl.js
Created October 19, 2014 01:45
Youtube-DL node function
/* ///////////////////////////////////////////////////////////////////////////
Simple YOUTUBE-DL function
AUTHOR: .LAG (@boycaught)
VERSION: 0.0.1
DATE: 2014-10-18
/////////////////////////////////////////////////////////////////////////// */
var exec = require('child_process').exec;
@boycaught
boycaught / gist:8388366
Last active January 3, 2016 01:19
Base OSX Box

Tutorial: Meteor in Windows using Vagrant

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on steps 8 to 15.

If you have no idea what I’m talking about, I’ve made a tutorial to install Ubuntu Precise x86 through Windows command-line with Meteor very simple to follow

@boycaught
boycaught / gist:5609923
Created May 20, 2013 01:41
AngularJS HTTP call skeleton, for posting to CouchDB (personal tutorial)
function CreateStoryController($scope, $http) {
// Create callback for success, injected into controller scope.
$scope.submitStory = function() {
var success = function(data, status, headers, config) {
$scope.message = 'Success!';
};
// Create callback for failure.
var failure = function(data, status, headers, config) {
@boycaught
boycaught / gist:4622976
Created January 24, 2013 15:23
CouchDB snippet:
// Nicked from: http://feedproxy.google.com/~r/cloudant/~3/3sqjw_b2Ekg/make-it-easy
// Dependencies: JQuery and sag.js (http://www.saggingcouch.com/)
$(function() {
// since I want to work locally (but use Cloudant data), I've set up a reverse proxy
// more on reverse proxy: http://wiki.apache.org/couchdb/Apache_As_a_Reverse_Proxy
// use sag.js to connect
var user_db = 'my-Cloudant-database-name';
var couch = sag.server('my-server'); // localhost
couch.setDatabase(user_db);
@boycaught
boycaught / gist:3127580
Created July 17, 2012 06:24
CF+Java file downloader
<!--- suggested on: http://stackoverflow.com/questions/4738610/downloading-large-file-in-coldfusion-using-cfhttp --->
<cfscript>
source = 'protocol://domain/path/to/file.ext';
destination = getDirectoryFromPath(getCurrentTemplatePath()) & listlast(source, "/");
// bytearray routine
private binary function getByteArray (
required numeric size
)
output = false