Skip to content

Instantly share code, notes, and snippets.

sudo add-apt-repository ppa:noobslab/icons
sudo apt-get update
sudo apt-get install arc-icons arc-theme unity-tweak-tool moka-icon-theme
npm config set registry http://registry.npmjs.org/
npm config set http-proxy http://username:password@ip:port
npm config set https-proxy http://username:password@ip:port
npm set strict-ssl false
@timbophillips
timbophillips / getFilesAsJSON.php
Created April 17, 2017 15:59
php script to return files in folder as JSON from web service
<?php
/*
call this with GET
returns JSON of files in folder
optional arguments:
folder (defaults to current folder)
extension (defaults to all files)
*/
@timbophillips
timbophillips / getFilesAsJSON.php
Created April 17, 2017 17:19
simpler php script to return file list as JSON - no option for extension
<?php
/*
call this with GET
returns JSON of files in folder
optional arguments:
folder (defaults to current folder)
*/
if (isset($_GET['folder'])) {
@timbophillips
timbophillips / getFilesAsJSON.php
Created April 17, 2017 17:22
simplest version with hardwired folder name in it
<?php echo json_encode(array_slice(scandir('./folder'),2)); ?>
@timbophillips
timbophillips / filesJSON.php
Created April 18, 2017 02:42
this script when called will output the list of files in its folder, minus itself, as JSON
<?php
/* this script when called will output the list of files in its folder, minus itself, as JSON */
$files = scandir('./');
$justFilesNoFolders = array_filter($files, function($item) {
return !is_dir($item);
}
);
@timbophillips
timbophillips / material.module.ts
Last active May 12, 2017 21:19
material.module.ts & theme.scss file for angular-cli to do all the material.angular.io stuff
/*
load this in the app.module.ts file with these lines:
import { MaterialModule } from './material/material.module';
imports: [
...,
...,
...,
MaterialModule
],
@timbophillips
timbophillips / README.md
Created April 23, 2017 05:23 — forked from alienlebarge/README.md
Setting proxy with node.js

Node.js behind a proxy

Write proxy settings

$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128

This config is great for SquidMan app.

@timbophillips
timbophillips / set_win7_proxy_and_cpp_for_npm_and_git.bat
Last active November 14, 2018 18:41
Set up Windows 7 environment to run nodejs, npm, native builds, and Git behind a corporate web proxy
@echo off
:: this batch file:
:: 1. sets the username, password, and web proxy server in npm, git, and the windows environment.
:: 2. tells nom which version of c++ compiler and where it is
:: constants to set for your system
set npm_location=d:\nodejs\npm.cmd
:: these are just reminders for me and the things I was using on my system when I had this issue
@timbophillips
timbophillips / couchdb-ubuntu-zesty.txt
Created August 13, 2017 09:11
couchdb 2.1 installation packages ubuntu zesty 17.04
# install from this website
http://docs.couchdb.org/en/latest/install/unix.html#installation-using-the-apache-couchdb-convenience-binary-packages
# add this to apt sources so that libicu55 is available (libicu57 has replaced it in zesty)
deb http://security.ubuntu.com/ubuntu xenial-security main