Skip to content

Instantly share code, notes, and snippets.

View moul's full-sized avatar
🌸
Creating languages for coordinated impact.

Manfred Touron moul

🌸
Creating languages for coordinated impact.
View GitHub Profile
@gfanton
gfanton / gno-mode.el
Last active August 9, 2023 07:50
gno mode starter
;;; gno-mode.el --- Major mode for editing GNO files, based on go-mode -*- lexical-binding: t -*-
;; Author: Guilhem Fanton <guilhem.fanton@gmail.com>
;; Version: 0.1
;; Package-Requires: ((emacs "24.3") (go-mode "1.5.0"))
;; Keywords: languages, gno
;; URL: https://gist.github.com/gfanton/6e233656dfeabd7a46f21f7507b6b311
;;; Commentary:
;;
@moul
moul / 1. intro.txt
Last active February 15, 2024 18:16
Yo! 👋👋
+ -== ==|
( <*> <*> ||//
| | yo _||/__
| __| \| |||
| +++ \ /
@jonahsnider
jonahsnider / four.js
Last active June 19, 2023 23:59
Get the value 4 in Node.js
const four = () => process.toString().big().endsWith(String.fromCharCode(18 + ((process.toString().substring(1, 2).charCodeAt(Number.MIN_VALUE)) * 4) - Math.pow(20, 2))).toString().length;
console.log(four()); // 4
const assert = require("assert");
const fourButReadable = () => {
// String that contains an o as the second character
const objectInString = process.toString();
assert.strictEqual(objectInString, "[object process]");
@automaticit
automaticit / hide-quantum-tab-bar.sh
Created November 21, 2017 13:05
Hide Firefox Quantum tab bar
#!/bin/bash
#
# Based upon [[https://superuser.com/questions/1268732/how-to-hide-tab-bar-tabstrip-in-firefox-57-quantum/1268734#1268734][How to hide tab bar (tabstrip) in Firefox 57+ Quantum]] by [[https://superuser.com/users/162466/vasyanovikov][VasyaNovikov]]
# This causes the [[https://support.mozilla.org/en-US/questions/1187186][The Back Button is top right under the Red close button on my Mac]] issue.
# Resolve that by right-clicking the toolbar, then inserting three Flexible Space into the toolbar on the far-left-hand side.
case $( uname ) in
"Linux")
profile_dir=~/.mozilla/firefox/$( ls -tr ~/.mozilla/firefox/ | grep -v profiles.ini | tail -1 )
;;
"Darwin")
@cerisier
cerisier / install-py3-dataproc.sh
Last active July 2, 2021 21:56
Dataproc initialization action script for installing python3
#!/bin/bash
# from https://gist.githubusercontent.com/nehalecky/9258c01fb2077f51545a/raw/789f08141dc681cf1ad5da05455c2cd01d1649e8/install-py3-dataproc.sh
apt-get -y install python3
echo "export PYSPARK_PYTHON=python3" | tee -a /etc/profile.d/spark_config.sh /etc/*bashrc /usr/lib/spark/conf/spark-env.sh
echo "Adding PYTHONHASHSEED=0 to profiles and spark-defaults.conf..."
echo "export PYTHONHASHSEED=0" | tee -a /etc/profile.d/spark_config.sh /etc/*bashrc /usr/lib/spark/conf/spark-env.sh
echo "spark.executorEnv.PYTHONHASHSEED=0" >> /etc/spark/conf/spark-defaults.conf
[ 464.491849] BUG: unable to handle kernel NULL pointer dereference at 0000000000000009
[ 464.586152] IP: [<ffffffff8101b290>] intel_pmu_lbr_read+0x70/0x480
[ 464.660511] PGD 465196067 PUD 46a823067 PMD 0
[ 464.713979] Oops: 0000 [#1] SMP
[ 464.752720] Modules linked in: kvm_intel kvm fjes irqbypass autofs4
[ 464.828642] CPU: 3 PID: 4012 Comm: dummy Not tainted 4.4.6-std-4 #1
[ 464.903933] Hardware name: Online Labs SR/SR, BIOS 00.00.00.0007 03/04/2016
[ 464.987580] task: ffff88046d27cac0 ti: ffff88046c4c0000 task.ti: ffff88046c4c0000
[ 465.077491] RIP: 0010:[<ffffffff8101b290>] [<ffffffff8101b290>] intel_pmu_lbr_read+0x70/0x480
[ 465.181084] RSP: 0000:ffff88046c4c3c58 EFLAGS: 00010006
@cerisier
cerisier / random.txt
Created January 24, 2016 23:31
List of words for random entry creative technique
Adult
Aeroplane
Air
Aircraft Carrier
Airforce
Airport
Album
Alphabet
Apple
Arm
@moul
moul / linux distrib builds.md
Last active January 15, 2016 13:32
linux distrib builds
distrib/builder debootstrap qemu-debootstrap multistrap rinse urpmi anaconda chroot + static pm pacstrap kickstart preseed
debian Y Y Y ?
ubuntu Y Y Y ?
fedora Y Y Y ?
centos Y Y Y ?
redhat Y Y Y ?
gentoo
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active February 24, 2024 04:41
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@Zillionx
Zillionx / OSX_TCP_options.command
Last active November 21, 2017 03:48
OSX - Tuning the Network Stack TCP
## Quick fix for slow internet after update to OSX 10.11 "El Capitan"
## Changes are not permanent, just restart your mac if it doesn't work.
## write config
sudo su -
sysctl -w net.inet.tcp.doautorcvbuf=0
sysctl -w net.inet.tcp.doautosndbuf=0
sysctl -w net.inet.tcp.win_scale_factor=0
# net.inet.tcp.recvspace=1048576
# net.inet.tcp.sendspace=131072