Skip to content

Instantly share code, notes, and snippets.

View linktohack's full-sized avatar

Quang-Linh LE linktohack

View GitHub Profile
@linktohack
linktohack / letter.org
Created April 1, 2017 19:18
Better spacing...
#+OPTIONS: toc:nil
#+LATEX_HEADER: \usepackage[a4paper]{geometry}
#+LATEX_HEADER: \setlength{\parindent}{0em}
#+LATEX_HEADER: \setlength{\parskip}{0.8em}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.35}
@linktohack
linktohack / ouistipix.txt
Created March 21, 2017 16:25
description
Ouistipix is a photo printing service that allows users to chose photos from multiple source s including Instagram.
We use the API to download users' public photos and send it to the printing service.
@linktohack
linktohack / subscene.js
Created March 4, 2017 11:07
Download sub etc
// @flow
var rp = require('request-promise');
var cheerio = require('cheerio');
var _ = require('lodash');
var fs = require('fs');
var Promise = require('bluebird');
var JSZip = require('JSZip');
var imdbID = 'tt1355644';
@linktohack
linktohack / scamark-list.js
Created March 3, 2017 08:58
List uploaded terminals
const http = require('http');
const exec = require('child_process').exec;
const hostname = '0.0.0.0';
const port = 3000;
const server = http.createServer((req, res) => {
exec('ls /home/scamark | sed s"/-2017.*//" | sort | uniq', (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
@linktohack
linktohack / debugger.js
Created February 24, 2017 19:02
debugger.js
var prevajax = jQuery.ajax;
jQuery.ajax = function () { debugger; return prevajax.apply(jQuery, arguments); };
@linktohack
linktohack / upload.sh
Last active February 24, 2017 17:52
Upload Scamark
#!/bin/bash
rm -rf app.log
touch app.log
lxterminal -e 'tail -f app.log' 2>> app.log 1>> app.log &
lxterminal -e 'tail -f /var/log/mysql/error.log' 2>> app.log 1>> app.log &
sudo zerotier-cli join e5cd7a9e1cd6187e 2>> app.log 1>> app.log &
@linktohack
linktohack / gulpfile.js
Created February 17, 2017 23:10
Gulp live reload
'use strict';
var gulp = require('gulp'),
livereload = require('gulp-livereload');
gulp.task('default', function () {
livereload.listen(35000);
gulp.watch('starter.html', function () {
gulp.src('starter.html').pipe(livereload())
});
@linktohack
linktohack / drop-link.js
Created February 7, 2017 17:37
Remove all Dropbox Links
@linktohack
linktohack / patch.sh
Last active February 6, 2017 15:01
Scarmark Patch
#!/bin/bash
cat > "$HOME/main.html" <<'EOF'
<style>
.magasin-lot-info {
font-family: monospace;
font-size: 8px;
color: white;
padding: 8px;
}
</style>
@linktohack
linktohack / Dockerfile
Created January 23, 2017 00:30
Firefox in Docker
FROM ubuntu:16.04
MAINTAINER [email protected]
RUN apt-get update && \
apt-get install -y x11vnc xvfb dwm firefox && \
rm -rf /var/lib/apt/lists/*
RUN mkdir ~/.vnc && \
x11vnc -storepasswd 1234 ~/.vnc/passwd && \
bash -c 'echo "#!/bin/bash" > /entrypoint.sh' && \
bash -c 'echo "Xvfb :0 -screen 0 1024x768x16 &" >> /entrypoint.sh' && \
bash -c 'echo "sleep 1" >> /entrypoint.sh' && \