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
## Alternative 1: write to file descriptor (not usable) | |
input='testing' | |
pid=1212 | |
echo $input > /proc/$pid/fd/0 | |
## Alternative 2: Pipe fifo to the app | |
fifo_file=/tmp/fifo |
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
FROM debian:jessie | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update \ | |
&& apt-get install -y x11-apps |
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
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '**.py' | |
- '.github/workflows/lambda_deploy.yml' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
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 | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Cache; | |
/** | |
* Laravel command to calculate and cache logs statistics | |
*/ | |
class CalculateStatisticsCommand extends Command { |
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
/** | |
* Tracks server pings for determining if the connection dropped. | |
* Will terminate non-responsive connections. | |
* This close event should initiate the process of recreating the connection in the ws module manager (eg ws/user.js and modules/ws-user.js) | |
*/ | |
function setupWsHeartbeat(ws) { | |
// will close the connection if there's no ping from the server | |
function heartbeat() { | |
clearTimeout(this.pingTimeout); |
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
diff -rupN yaffey-orig/main.cpp yaffey-qt5/main.cpp | |
--- yaffey-orig/main.cpp 2014-06-11 20:01:50.155769286 -0300 | |
+++ yaffey-qt5/main.cpp 2014-06-11 20:24:07.659482714 -0300 | |
@@ -16,7 +16,7 @@ | |
* along with this program. If not, see <http://www.gnu.org/licenses/> | |
*/ | |
-#include <QtGui/QApplication> | |
+#include <QApplication> | |
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 | |
class ApiTest extends TestCase | |
{ | |
public function setUp() | |
{ | |
parent::setUp(); | |
$this->session_id = session()->getId(); |
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
# Tools installation | |
pip install gitinspector | |
gem install git_stats | |
# Generate the reports | |
cd git_proj | |
git_stats generate | |
gitinspector -f php,js,less -F html > git_stats/inspector.html | |
# Generate time-sheets |
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
import os, sys | |
import win32print | |
import StringIO | |
printer_name = win32print.GetDefaultPrinter() | |
hPrinter = win32print.OpenPrinter(printer_name) | |
def prn_txt(text): | |
if sys.version_info >= (3,): |
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
class UnbalancedBlockException(Exception): | |
pass | |
'''Representation of a brackets block and a node in the tree''' | |
class Block(object): | |
def __init__(self, char, parent): | |
self.initiator = char | |
self.children = [] | |
self.parent = parent | |
# attach to the parent block |
NewerOlder