Skip to content

Instantly share code, notes, and snippets.

View florinutz's full-sized avatar
🌴
I'd much rather have Foucalt quoted at computer conferences than Dijkstra

Florin florinutz

🌴
I'd much rather have Foucalt quoted at computer conferences than Dijkstra
  • Berlin
View GitHub Profile
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
$pdfEngine = $this->container->get('knp_snappy.pdf');
$response
->setContent($pdfEngine->getOutputFromHtml($html, [
'header-left' => 'nothing',
'header-center' => 'nothing again',
'header-html' => $this->admin->generateUrl('pdf-header', [], true)
]))
->headers->add([
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="wyzbiz_invoice_' . $invoice->getInvoiceNumber() . '.pdf"'
frequency:
- [ P2D, 5 ]
- [ T13M, 20 ]
private function getFrequencySection()
{
$builder = new TreeBuilder();
$node = $builder->root('frequencies');
return $node
->cannotBeEmpty()
->requiresAtLeastOneElement()
->prototype('array')
->beforeNormalization()
->ifString()
<?php
// florin 10/10/14 4:15 PM
$a = new stdClass();
$a->panaMea = "Panama";
$b = $a;
$b->panaMea = "Uzbekistan";
var_export($a);
@florinutz
florinutz / 0_reuse_code.js
Created April 21, 2017 14:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@florinutz
florinutz / gist:56ba16479eb4482cc744f9528d28c96f
Created October 28, 2017 01:01
romaneasca de halloween
Ieşi omul negru
din negru bordei,
luă secure neagră
cu negru temei.
Merse la pădure
tăie negru lemn,
neagra lui secure
are-un negru semn
Făcu un plug negru
cu negru brăzdar,

Keybase proof

I hereby claim:

  • I am florinutz on github.
  • I am fl0 (https://keybase.io/fl0) on keybase.
  • I have a public key ASD41zRDeGapfsblfBD7HAJvPMFQA-tz_5h4ykUwSO1HZgo

To claim this, I am signing this object:

@florinutz
florinutz / update.go
Created March 29, 2019 14:11
Compressing a boltdb database using gz
package main
import (
"bytes"
"compress/gzip"
"crypto/sha256"
"encoding/gob"
"fmt"
"io/ioutil"
"log"
package main
import "fmt"
func main() {
fmt.Printf("%v\n", find("apple", "ale")) // true
fmt.Printf("%v\n", find("apple", "alp")) // false
}
func find(haystack, needle string) bool {