Skip to content

Instantly share code, notes, and snippets.

Ruben Maher eqyiel

Block or report user

Report or block eqyiel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View *scratch*.el
~/sync/git/blue-moon-games/blue-moon-games master* 7s
❯ omnisharp-roslyn
Failed to launch '/bin/bash' with args, '-c 'uname -s -m''
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Stdio.Host","Message":"Starting OmniSharp on Unknown 0.0 (Unknown)"},"Seq":1,"Type":"event"}
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Services.DotNetCliService","Message":"DotNetPath set to dotnet"},"Seq":2,"Type":"event"}
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.MSBuild.Discovery.MSBuildLocator","Message":"Located 1 MSBuild instance(s)\n 1: StandAlone 15.0 - \"/nix/store/yjqp3591f77mgki0i2bqxcbja0ad557b-omnisharp-linux/omnisharp/msbuild/15.0/Bin\""},"Seq":3,"Type":"event"}
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.MSBuild.Discovery.MSBuildLocator","Message":"MSBUILD_EXE_PATH environment variable set to '/nix/store/yjqp3591f77mgki0i2bqxcbja0ad557b-omnisharp-linux/omnisharp/msbuild/15.0/Bin/MSBuild.dll'"},"Seq":4,"Type":"event"}
{"E
View *scratch*.el
#!/bin/sh
# Sample usage:
# ❯ nix-grep-propagated-build-inputs /nix/store/0bvp7g95i5p7m3s0is1acikhwjhv1vr9-nextcloud-client-2.5.0git.drv openssl
# /nix/store/0jd1gsnmsdg8zrzy4an1cdhj1cfrmaj3-qtbase-5.11.1-dev/nix-support/propagated-build-inputs:/nix/store/zsb7fpy9k61kbdg3h3dqcqfk3wrxwfpr-libxml2-2.9.8-dev /nix/store/b8kyvsj5xfbxafgb0acp8gsr6wr200b1-libxslt-1.1.32-dev /nix/store/pvwihqljhxd4zv5g5l3qxkqfzz2d0d0q-openssl-1.0.2o-dev /nix/store/awplqhpipm0cq28k6sgr2dcryhb650cg-sqlite-3.24.0-dev /nix/store/wm92zyin0gjjvha3kxg2x7xg19wbj686-zlib-1.2.11-dev /nix/store/miq37wrkg7n23i3164vm6dwbxn9k2rq5-harfbuzz-icu-1.8.2-dev /nix/store/mpayk2qxxnjzg9imiixbfg7zcqjjpy9m-icu4c-59.1-dev /nix/store/pvfyhd8s4zsr0x8avwb59kr971vrqn4b-libjpeg-turbo-1.5.3-dev /nix/store/9zfcc0m4byss40ynixsgnryyq3p0lv3k-libpng-apng-1.6.34-dev /nix/store/1954i1yvaqww5l05v84ds3lrxf6kw15a-libtiff-4.0.9-dev /nix/store/7c2v0bwdjjw5zzjlrk05cpj31rj6zfzf-pcre2-10.31-dev /nix/store/wxqkkhir16ki7m5hx8pzzj15m9jkdr00-dbus-1.12.8-dev /nix/store/qvxkvwhbsmvz72s
View shell.nix
{ nixpkgs ? <nixpkgs> }:
# note that importing ./nix/node is equivalent to importing ./nix/node/default.nix
with import nixpkgs {}; (import ./nix/node { nodejs = pkgs.nodejs; }).shell
View *scratch*.el
❯ ./nixops deploy -d tomoyo.maher.fyi
added deployment ‘aa41d5a6-a81a-11e7-96f3-28d244ac8d32’
building all machine configurations...
these derivations will be built:
/nix/store/02nglk49pjsp6bs8a9hj55psgx3vismp-unit-pulseaudio.service.drv
/nix/store/06yhdxcygd6ckhh8y7rj94m6wvp2gzwy-unit-script.drv
/nix/store/0blazp16bg0j8ixvj32nl7964zx3i5fq-unit-zfs-snapshot-daily.service.drv
/nix/store/0bmvc31m8ca8js1imn1ffx6l7ffn9z7v-unit-network-setup.service.drv
/nix/store/5kpqa3npsz3x5062ccclpphhh2lmfj6g-unit-script.drv
/nix/store/fgs7hvmwvpfq7jzj5vnard16sq48l8w8-unit-script.drv
@eqyiel
eqyiel / configure.sh
Created Feb 22, 2018 — forked from LnL7/configure.sh
darwin nix-daemon distributed builds
View configure.sh
#!/usr/bin/env bash
sudo mkdir -p /run/nix/current-load
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo curl -fsSL -o /Library/LaunchDaemons/org.nixos.nix-daemon.plist https://gist.github.com/LnL7/ba2eac19e77cd6b4bb02c8de03bf5f4e/raw/69722c2b13c4eb022a1312cd6891838b413e1f96/org.nixos.nix-daemon.plist
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
# Configure /etc/nix/machines
# Make sure root can ssh to the builder (known_hosts etc.)
@eqyiel
eqyiel / readme.md
Created Dec 11, 2017 — forked from IOAyman/readme.md
Use yarn with Greenkeeper
View readme.md

Use yarn with Greenkeeper

When using yarn, it will create a yarn.lock lockfile which holds data on your used dependencies. This file also includes hard-typed versions, so should you update your dependencies, the yarn.lock file is basically outdated and needs to be regenerated. While yarn does this automatically, Greenkeeper pull requests that update dependencies as of right now do not do this regeneration, which means you would have to do it manually.

This gist shows you a way how to automatise this step using a Travis CI script.

Prerequisites

  • You use Travis CI and have it build Pull Requests (default behaviour)
  • You have a yarn.lock file in your repository for Travis CI to automatically install yarn (yarn will be added to their default images soon)

Getting started

@eqyiel
eqyiel / webpack.config.js
Last active Nov 3, 2017
How to monkeypatch webpack-dev-server ^2.9.3 for use with react-devtools
View webpack.config.js
/**
* webpack.config.js
*/
const webpack = require('webpack');
const path = require('path');
const { stripIndent } = require('common-tags');
module.exports = (env, { p: production }) => ({
...{
View *Nix-REPL*.txt
nix-repl> mkVal = with lib; let mkIndent = depth: concatStrings (builtins.genList (_: " ") (2 * depth)); in { value, depth ? 0 }: if (value == true) then "true"
else if (value == false) then "false"
else if (isInt value) then (toString value)
else if (isList value) then concatMapStringsSep " " mkVal { inherit value depth; }
else if (isAttrs value) then
(concatStringsSep "\n${mkIndent (depth + 1)}"
([ "{" ] ++ (mapAttrsToList
(attrName: attrValue: "${attrName} = ${mkVal { value = attrValue; depth = depth + 1; }}")
value) ++ [ "\n${mkIndent depth}}\n" ]))
View *Nix-REPL*.txt
nix-repl> mkVal = with lib; let mkIndent = depth: concatStrings (builtins.genList (_: " ") (2 * depth)); in { value, depth ? 0 }: if (value == true) then "true"
else if (value == false) then "false"
else if (isInt value) then (toString value)
else if (isList value) then concatMapStringsSep " " mkVal { inherit value depth; }
else if (isAttrs value) then
(concatStringsSep "\n${mkIndent (depth + 1)}"
([ " {" ] ++ (mapAttrsToList
(attrName: attrValue: "${attrName} = ${mkVal { value = attrValue; depth = depth + 1; }}")
value) ++ [ "\n${mkIndent depth}}\n" ]))
View with-ec2-security-group-ingress.sh
#!/usr/bin/env bash
# http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html
# http://docs.aws.amazon.com/cli/latest/reference/ec2/revoke-security-group-ingress.html
set -euo pipefail
fatal() {
echo '** ERROR:' "$@" >&2
exit 1
You can’t perform that action at this time.