apt-get update &&\
apt-get install -y libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb
Xvfb -ac -screen scrn 1280x2000x24 :9.0 &
export DISPLAY=:9.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#ident "@(#)backup_freenas_rsync 0.19 2017/09/01 K. Raquel Sanborn" | |
# | |
# Script name: | |
# backup_freenas_rsync | |
# | |
# OS supported: | |
# FreeNAS 9.3, 9.10 | |
# | |
# Description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 | |
Also put this (without sudo) in /etc/rc.local to run on reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: | |
:: Aliases for windows command line | |
:: | |
:: Installation: | |
:: | |
:: - create a folder for your aliases (eg: ```c:\cmd-aliases```) | |
:: - add that folder to your PATH variable | |
:: - save this script as setalias.cmd on that folder | |
:: - run "alias" to see usage | |
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# set env vars from within ec2 instance | |
EC2_AVAIL_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone` | |
EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`" |
I hereby claim:
- I am kanatzidis on github.
- I am kanatzidis (https://keybase.io/kanatzidis) on keybase.
- I have a public key ASB1lKWzHa_c2RUs2Oj3c51T1lUfxm7B2iwT1bZdCWEtYAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pushState friendly! | |
# The setup: | |
# * website name is `site.com` | |
# * the API for your running on localhost:3000 | |
# * the root for API calls is at `/api`, and you have authentication routes with root `/auth` (both go to localhost:3000) | |
# * javascript app is located at `/path/to/javascript/app` | |
# Assuming you have your server for API calls at localhost port 3000 | |
upstream api_sitecom { | |
server localhost:3000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos6 | |
# Enable EPEL for Node.js | |
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# Install Node.js and npm | |
RUN yum install -y npm | |
# Bundle app source | |
COPY . /src | |
# Install app dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int* bubble(int array[], size_t size); | |
int main(void) | |
{ | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-bubble (lst) | |
(or (not lst) | |
(let ((ret nil) (iter nil) (small (reduce (lambda (x y) (min x y)) lst))) | |
(dolist (obj lst) | |
(if (not (eql obj small)) | |
(setf iter (cons obj iter)) | |
(setf ret (append ret (cons obj nil))))) | |
(append ret (let ((a (my-bubble iter))) (and (listp a) a)))))) | |
(my-bubble '(1 4 3 8 2 9)) |
NewerOlder