Skip to content

Instantly share code, notes, and snippets.

@ImanMousavi
ImanMousavi / GenerateEthereumWallet.php
Last active November 28, 2022 06:14 — forked from onimusya/GenerateEthereumWallet.php
Generate Ethereum Wallet using PHP
<?php
require_once "vendor/autoload.php";
use Sop\CryptoTypes\Asymmetric\EC\ECPublicKey;
use Sop\CryptoTypes\Asymmetric\EC\ECPrivateKey;
use Sop\CryptoEncoding\PEM;
use kornrunner\keccak;
/**
@eburlingame
eburlingame / xplane_client.c
Created November 19, 2018 17:52
Basic UDP client to get/set data from XPlane using C on Windows
#include "xplane_client.h"
/*----------------------------------------------
Statics
----------------------------------------------*/
static int client_s;
static sockaddr_in server_addr;
static sim_data_type current_state;
static char is_socket_open;
@fed-franz
fed-franz / Bitcoin-Core-Gitian-Build-Guide_Debian+script.txt
Last active January 25, 2022 09:20
HowTo: create a Bitcoin Core Gitian Build (using: Debian VM on VirtualBox + gitian-build.sh)
#References:
#https://github.com/bitcoin-core/docs/blob/master/gitian-building.md
#https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md
#https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md (actually not used in this guide, but useful as a reference)
1) Create a Debian VM as a building environment (it will be accessed via SSH)
------------------------------------------------------------------------------------------------------
Follow the instructions at:
https://github.com/bitcoin-core/docs/blob/master/gitian-building/gitian-building-create-vm-debian.md
@danvbe
danvbe / 1-Explanations.md
Last active November 14, 2024 02:13
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@tristanbes
tristanbes / Book.php
Created March 19, 2012 15:29
How to dynamically add translations to your I18N object using SonataAdminBundle & DoctrineExtensions
<?php
namespace Demo\BookBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Demo\BookBundle\Entity\Book
BLACK => "\033[30m",
RED => "\033[31m",
GREEN => "\033[32m",
YELLOW => "\033[33m",
BLUE => "\033[34m",
PURPLE => "\033[35m",
CYAN => "\033[36m",
WHITE => "\033[37m",
# background color