Skip to content

Instantly share code, notes, and snippets.

View fobbyal's full-sized avatar

Alex Liang fobbyal

View GitHub Profile
@fobbyal
fobbyal / gist:ce187b96619cc65432f6
Last active January 22, 2016 02:12 — forked from akolosov/gist:cedaac86b333a4ced95f
vim 7.4 with lua+GUI on Ubuntu 14.04
#!/bin/sh
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
git clone https://github.com/vim/vim.git
let todo = (state={},action) => {};
let menus = {state={},action} => {};
var combined=combineReducers({ todos, menus });
export (state = {} , action) => {
if(aciton.type='MASS_UPDATE') {
//do mass tree update
return //new state;
}else{
@fobbyal
fobbyal / Card.js
Last active January 28, 2016 19:53
export default class CardsTable extends React.Component {
constructor(props) {
super(props);
this.state = {data: []};
}
createDuplicates = (arr) => {
let doubleArr = arr.slice(0);
for (let obj of arr) {
let clone = JSON.parse(JSON.stringify(obj));
AuthPolicy.registerAuthScheme(AuthPolicy.NTLM, JCIFS_NTLMScheme.class);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("USER");
auth.setPassword("PASSWORD");
auth.setDomain("DOMAIN");
auth.setHost("host.com");
auth.setPort(443);
List authPrefs = new ArrayList(1);
authPrefs.add(AuthPolicy.NTLM);
auth.setAuthSchemes(authPrefs);
@fobbyal
fobbyal / nginx.conf
Created August 2, 2016 19:22 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@fobbyal
fobbyal / package.json
Created November 7, 2016 19:16
cover example
{
"name": "tracker-ext-ui",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node serve -m rhl3",
"serve:dev": "node serve --mock false",
"preserve:dist": "node_modules/.bin/rimraf dist",
"serve:dist": "node serve -m prod --mock false",
@fobbyal
fobbyal / docker-cleanup-resources.md
Created January 13, 2018 14:19 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

{
"vim.insertModeKeyBindings": [
{
"before": [
"j",
"k"
],
"after": [
"<Esc>"
]
@fobbyal
fobbyal / README.md
Created January 21, 2019 17:00 — forked from phillipgreenii/README.md
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm

@fobbyal
fobbyal / checkbox.svg
Created January 22, 2019 03:01
check box svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.