Skip to content

Instantly share code, notes, and snippets.

View 5quinque's full-sized avatar
:electron:
🪴

Ryan 5quinque

:electron:
🪴
View GitHub Profile
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
void print_array(int *array, int array_size);
int main(int argc, char **argv) {
int *array;
int array_size;
int i = 0;
@5quinque
5quinque / gist:ae3d8fa3ddedd8ae447eccd93d07d056
Created May 9, 2019 14:35
rtorrent as a systemd service (with selinux module)
## rtorrent as a service
# /etc/systemd/system/rtorrent.service
[Unit]
Description=rTorrent Daemon
After=network.target
[Service]
Type=forking
KillMode=none
RemainAfterExit=true
# also run
# chcon -Rt svirt_sandbox_file_t /share/transmission
#
module container_t 1.0;
require {
type init_t;
type samba_share_t;
type devpts_t;
<?php
function readInput()
{
$wires = [];
if ($file = fopen("input/day3.txt", "r")) {
while ($line = fgets($file)) {
$wires[] = explode(",", $line);
}
# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle/tree/master/Resources/doc/index.md
# https://symfony.com/doc/2.0/bundles/LiipImagineBundle/data-loader/flysystem.html
oneup_flysystem:
adapters:
default_adapter:
local:
directory: '%kernel.project_dir%/var/storage/default'
acme.flysystem_adapter:
awss3v3:
# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
enqueue: true
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "imagick"
resolvers:
# https://symfony.com/doc/2.0/bundles/LiipImagineBundle/cache-resolver/aws_s3.html
s3_cache:
# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
enqueue: true
cache: s3_cache
# valid drivers options include "gd" or "gmagick" or "imagick"
driver: "imagick"
resolvers:
<?php
namespace App\DataFixtures;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
class UserFixtures extends Fixture
<?php
namespace App\DataFixtures;
use App\Entity\Board;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
class BoardFixtures extends Fixture
@5quinque
5quinque / ArduinoISP_ProMicro_ATmega32U4.cpp
Created February 10, 2021 21:32
ArduinoISP_ProMicro_ATmega32U4
// ArduinoISP
// Copyright (c) 2008-2011 Randall Bohn
// If you require a license, see
// http://www.opensource.org/licenses/bsd-license.php
//
// This sketch turns the Arduino into a AVRISP using the following Arduino pins:
//
// Pin 10 is used to reset the target microcontroller.
//
// By default, the hardware SPI pins MISO, MOSI and SCK are used to communicate