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
" vim-bootstrap b990cad | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') |
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
" vim-bootstrap b990cad | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') |
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 | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs docker rmi | |
# remove unused volumes: | |
docker volume ls -qf dangling=true | xargs docker volume rm |
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
_sync "VDOM : The Virtual DOM implementation in Ironscript" | |
(_include "stdlib") | |
[defun h (type props :children) { | |
[.props = props] | |
[parse-type-string = @{ | |
var type = args[0]; | |
var idDelim = args[1]; |
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
<?php | |
phpinfo(); | |
?> |
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
# create a local bin | |
mkdir -p ~/bin | |
# link python2 as default python in local bin and export the path (must for Ubuntu 16.04) | |
ln -s ${which python2} ~/bin/python | |
export PATH=~/bin:$PATH | |
# create node_env directory and setup the virtualenv there, activate that | |
mkdir -p ~/node_env |
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 <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <map> | |
#include <utility> | |
#include <iostream> | |
#include <algorithm> | |
#include <cstring> | |
#include <string> | |
#include <cctype> |
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 <iostream> | |
#include <cctype> | |
using namespace std; | |
class board{ | |
public: | |
board(){ | |
for(int i=0; i<3; i++) | |
for(int j=0; j<3; j++) | |
mat[i][j] = ' '; // initially all cells are blank space |
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 <iostream> | |
#include <vector> | |
#include <queue> | |
#define INF 1000000007 | |
using namespace std; | |
typedef vector<vector<int> > graph; | |
void updateDist(graph &g, vector<int> &dist, int src){ | |
queue<int> q; |
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 <iostream> | |
#include <algorithm> | |
#define INF 1000000007 | |
using namespace std; | |
int dp[505][505][2]; // the storage for the DP (Dynamic programming) | |
int grid[505][505]; // the storage for the actual grid | |
void init(int n, int m){ // read from input and initialize the grid and | |
for(int i=0; i<n; i++){ // the DP arrays. |
NewerOlder