Skip to content

Instantly share code, notes, and snippets.

View Cretezy's full-sized avatar

Cretezy

View GitHub Profile
@Cretezy
Cretezy / .dockerignore
Last active October 18, 2019 21:44
Node + Docker with proper caching
Dockerfile
node_modules
@ziizii
ziizii / rsa.dart
Last active August 13, 2018 08:33
How to generate RSA private/public key pair in Dart with Pointy Castle
import 'dart:html';
import 'dart:math';
import 'dart:typed_data';
import "package:bignum/bignum.dart";
import "package:pointycastle/export.dart";
void main() {
var keyParams = new RSAKeyGeneratorParameters(new BigInteger("65537"), 2048, 5);
@rambabusaravanan
rambabusaravanan / .gitconfig
Last active April 30, 2024 04:40
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@begriffs
begriffs / sqitch_alternatives.txt
Created November 19, 2015 21:13
sqitch alternatives
https://github.com/flyway/flyway
https://github.com/mattes/migrate
https://bitbucket.org/liamstask/goose
https://github.com/tanel/dbmigrate
https://github.com/BurntSushi/migration
https://github.com/DavidHuie/gomigrate
https://github.com/rubenv/sql-migrate

Git Cheat Sheet

Commands

Getting Started

git init

or

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@rpietro
rpietro / brew_cask.sh
Last active November 11, 2015 20:19
brew cask installer
#!/bin/sh
brew cask install atext
brew cask install google-chrome
brew cask install skype
brew cask install vlc
brew cask install picasa
brew cask install dropbox
@antonioribeiro
antonioribeiro / gist:96ce9675e5660c317bcc
Created July 23, 2014 21:49
Codeception, Javascript and Laravel Homestead

You can use Codeception to test Javascript, like DOM manipulations and Ajax requests. Out of the box it can manipulate DOM elements but can't execute Javascript code, like most testing frameworks. But it gives you the option to use a WebDriver, to connect to a headless browser, and mimic a user browsing your website. It gives you some options: Selenium2, ZombieJS and, the easiest to configure, PhantomJS.

This article covers the installation and usage of PhantomJS, and assumes you are using Laravel Homestead, but it will work on any relatively new Debian based distro, like Ubuntu 14.04.

###Install PhantomJS

Just run those commands to install it:

sudo apt-get update
@joscha
joscha / .travis.yml
Created May 27, 2014 18:14
Sample travis file for typesafe activator
language: java
env:
- ACTIVATOR_VERSION=1.1.3 \
ACTIVATOR_ZIP_FILE=typesafe-activator-${ACTIVATOR_VERSION}-minimal.zip \
ACTIVATOR_ZIP_URL=http://downloads.typesafe.com/typesafe-activator/${ACTIVATOR_VERSION}/${ACTIVATOR_ZIP_FILE} \
ACTIVATOR_BIN=${TRAVIS_BUILD_DIR}/activator-${ACTIVATOR_VERSION}-minimal/activator
install:
- wget ${ACTIVATOR_ZIP_URL}
- unzip -q ${ACTIVATOR_ZIP_FILE}
script: