Skip to content

Instantly share code, notes, and snippets.

View Rivsen's full-sized avatar
🎯
Learning how to play~

Rivsen Tan Rivsen

🎯
Learning how to play~
View GitHub Profile
@thomasdarimont
thomasdarimont / AesCipher.php
Last active June 18, 2022 03:59
Example for 128bit AES with Java and PHP
<?php
class AesCipher {
private const OPENSSL_CIPHER_NAME = "aes-128-cbc";
private const CIPHER_KEY_LEN = 16; //128 bits
private static function fixKey($key) {
if (strlen($key) < AesCipher::CIPHER_KEY_LEN) {
@Rivsen
Rivsen / play.rs
Created January 20, 2017 14:07
play.rs
use std::iter::FromIterator;
fn main() {
let columns_number: i64 = 356;
println!("Number of columns_number: {}", columns_number);
let mut columns_array: Vec<String> = Vec::new();
let mut last_column: Vec<char> = Vec::new();
@abruneau
abruneau / install_openconnect_centos7.sh
Created April 29, 2016 14:55
Install open connect on Centos 7
sudo yum install epel-release
sudo yum install NetworkManager-openconnect
@hilios
hilios / README.md
Last active July 4, 2022 15:36 — forked from mhayes/supervisord.sh
init.d for supervisord for Amazon Linux AMI

Auto start for Supervisord at AWS

Install commands
$ sudo mv supervisor /etc/init.d
$ sudo chkconfig --add supervisor
$ sudo chkconfig supervisor on
@valentin2105
valentin2105 / docker-compose.yml
Created April 11, 2016 10:58
docker-compose.yml LEMP PHP7.0
web_db:
image: mariadb:latest
restart: always
volumes:
- ./var/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: @Str0NgP@Ssw0rd
web_front:
image: nginx
@Rivsen
Rivsen / routes.php
Created September 22, 2015 12:03
a php internat server route file for flarum
<?php
// Set timezone
// date_default_timezone_set("UTC");
// Directory that contains error pages
define("ERRORS", dirname(__FILE__) . "/flarum/error");
// Default index files
define("WEB_INDEX", "index.php");
define("API_INDEX", "api.php");
@karpathy
karpathy / min-char-rnn.py
Last active May 8, 2024 20:15
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@StefanieD
StefanieD / Readme.md
Created July 3, 2015 15:17
Install and use Supervisord with AWS Elastic Beanstalk, Symfony 2 and RabbitMq Bundle
  • Place the supervisord.conf under .ebextensions/supervisor/

  • Place the supervisor.config under .ebextensions/

  • Place the data_import_consumer.conf under .ebextensions/supervisor/

@Rivsen
Rivsen / .gitignore
Last active September 13, 2016 03:45
使用Symfony2的EventDispatcher组件创建自定义Event逻辑
composer.lock
vendor/
*.bak
*.swp
*.swap
*.old
*.back
.DS_Store
@mickaelandrieu
mickaelandrieu / upgrade2.3-to-2.7.md
Last active April 26, 2022 11:56
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS

From Symfony 2.3 to Symfony 2.7: the complete guide

Objectives

  • assume your code doesn't use any deprecated from versions below Symfony 2.3
  • update dependencies from 2.3 to 2.7
  • do not support "deprecated", be "Symfony3-ready"
  • list tasks component by component, bundle by bundle.