I hereby claim:
-
I am wzulfikar on github.
-
I am wzulfikar (https://keybase.io/wzulfikar) on keybase.
-
I have a public key ASDwimH7OPEvqzHFVBGnJe6lWpzCz_sskDdNkffx8G1JBwo
I hereby claim:
I am wzulfikar on github.
I am wzulfikar (https://keybase.io/wzulfikar) on keybase.
I have a public key ASDwimH7OPEvqzHFVBGnJe6lWpzCz_sskDdNkffx8G1JBwo
| #!/bin/sh | |
| # create docker engine config at /etc/docker/daemon.json | |
| # to limit the size of container logs. | |
| # usage (with curl): | |
| # curl -s https://gist.githubusercontent.com/wzulfikar/e7740906110beaa90216f8f37320f5d8/raw/docker-daemon-log-opts.sh | sh | |
| config_dir="/etc/docker" | |
| config_file="$config_dir/daemon.json" | |
| max_size=50m |
| const secrets = require('secrets.js-grempe') | |
| const shamir = { | |
| create: (plainText, totalShares, threshold) => { | |
| // convert the text into a hex string | |
| var pwHex = secrets.str2hex(passphrase); // => hex string | |
| // split into 2 shares with a threshold of 2. | |
| // 1 share will be sent to backend and stored there | |
| // and another share will be kept by the user. |
| pipeline: | |
| build: | |
| image: alpine | |
| commands: | |
| - echo "do something :v" | |
| slack: | |
| image: plugins/slack | |
| channel: dev__builds | |
| webhook: https://hooks.slack.com/services/... | |
| /** | |
| * Using parallel function and thread in Scala. | |
| * | |
| * Run in scastie: https://scastie.scala-lang.org | |
| * | |
| */ | |
| // Higher-order function that displays | |
| // time elapsed to execute any given function | |
| def timer (taskId : String, f: () => Unit) = { |
| /** | |
| * Wed, 15 Nov 2017 at 0:56:13 MYT | |
| * "Using TypeScript to create order summary." | |
| * | |
| * The purpose of this snippet is to demonstrate the | |
| * use of TypeScript in our code. | |
| * You can run this code online here: | |
| * https://www.typescriptlang.org/play/ | |
| * | |
| * PS: |
| <?php | |
| /** | |
| * fetch profile of given fb's user id. fields are optional. | |
| */ | |
| function getFbProfile($userId, array $fields = []) | |
| { | |
| $ACCESSS_TOKEN = 'YOUR_TOKEN_HERE'; | |
| $BASE_URL = 'https://graph.facebook.com/v2.6'; | |
| // fetch default fields if no fields passed |
| server { | |
| listen 443; | |
| listen 80; | |
| server_name tracking.domain.com; | |
| add_header Strict-Transport-Security max-age=63072000; | |
| #client_max_body_size 200M; | |
| # Security features | |
| if ($http_user_agent ~* LWP::Simple|BBBike|wget) { |
| cd ~ | |
| sudo curl -sS https://getcomposer.org/installer | sudo php | |
| sudo mv composer.phar /usr/local/bin/composer | |
| sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
| composer --version |