This file contains hidden or 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
http://www.spoj.com/problems/AHOCUR | |
http://www.spoj.com/problems/FINDSR/ | |
http://www.spoj.com/problems/FILRTEST/ | |
http://www.spoj.com/problems/EPALIN/ | |
http://www.spoj.com/problems/PUCMM223 | |
http://www.spoj.com/problems/SPIRALGR/ | |
http://www.spoj.com/problems/DCEPC706/ | |
http://www.spoj.com/problems/MINNUM | |
http://www.spoj.com/problems/NITT2 |
This file contains hidden or 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
/* | |
* Source: http://www.zedwood.com/article/cpp-sha256-function/ | |
*/ | |
#include <string> | |
#include <cstring> | |
#include <fstream> | |
#include <iostream> | |
#define SHA2_SHFR(x, n) (x >> n) |
This file contains hidden or 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 <bits/stdc++.h> | |
typedef long long ll; | |
typedef std::tuple<ll, ll, ll> hash_t; | |
using namespace std; | |
class RollingHash { | |
public: | |
hash_t p = {13, 31, 19}; | |
hash_t hashes = {0, 0, 0}; | |
hash_t pows = {1, 1, 1}; |
This file contains hidden or 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
ffmpeg -re -f concat -i <(for i in {1..9999}; do printf "file '%s'\n" input.mp4; done) -f v4l2 /dev/video1 && !! |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
This file contains hidden or 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/sh | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
exited_containers() { | |
docker ps -a -q -f status=exited | |
} | |
untagged_containers() { |
Cleanup resources (containers, volumes, images, networks) ...
// 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
I hereby claim:
- I am kapillamba4 on github.
- I am kapillamba4 (https://keybase.io/kapillamba4) on keybase.
- I have a public key ASAS246jr7zBWF9dTygnH8uMmygkF379drKZYGx947Tnswo
To claim this, I am signing this object:
This file contains hidden or 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
EXPRESSIONS | |
<div id="app"> | |
<p>I have a {{ product }}</p> | |
<p>{{ product + 's' }}</p> | |
<p>{{ isWorking ? 'YES' : 'NO' }}</p> | |
<p>{{ product.getSalePrice() }}</p> | |
</div> | |
DIRECTIVES |