Skip to content

Instantly share code, notes, and snippets.

View flashvnn's full-sized avatar

Huynh Khac Thao flashvnn

View GitHub Profile
@maximilianschmitt
maximilianschmitt / jobs.js
Created September 3, 2014 23:47
Automated MySQL backups to S3 with node.js
'use strict';
var mysqlBackup = require('./mysql-backup');
var schedule = require('node-schedule');
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup);
@jameymcelveen
jameymcelveen / StyledRenderer_iOS.cs
Last active August 29, 2015 14:05
Pixate iOS helper for Xamarin.Forms. This class copies style info from Xamarin.Forms elements into the underlying native component.
using System;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using YourProject.iOS;
using System.ComponentModel;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using PixateFreestyleLib;
using Common;
@omrico1
omrico1 / yotpobatchexample.php
Last active June 8, 2022 09:55
Yotpo Batch Request and Parsing Example
<?php
//This is an example batch request for app_key GYRCLYSnfHKGlA9iQoYjeVQ0297Fr4kvW5kaZ9Zw, please remember to switch to your own.
$url = 'http://staticw2.yotpo.com/batch';
//Building the batch data
$data = array('methods' => '
[{"method":"main_widget","params":{"pid":"295823037"}},
{"method":"bottomline","params":{"pid":"295823037",
"link":"",
@tkhn
tkhn / apache-exclude-urls-basic-auth.conf
Created October 9, 2013 10:33
exclude one url from basic auth with apache
SetEnvIfNoCase Request_URI "^/status\.php" noauth
AuthType Basic
AuthName "Identify yourself"
AuthUserFile /path/to/.htpasswd
Require valid-user
Order Deny,Allow
Deny from all
Allow from env=noauth
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
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