Skip to content

Instantly share code, notes, and snippets.

View angristan's full-sized avatar
:shipit:
hehehe

Stanislas angristan

:shipit:
hehehe
View GitHub Profile
@tylermorganwall
tylermorganwall / humanity_globe.R
Created August 17, 2021 14:37
3D Humanity Globe
library(rayshader)
library(rayrender)
popdata = raster::raster("gpw_v4_population_density_rev11_2020_15_min.tif")
population_mat = rayshader:::flipud(raster_to_matrix(popdata))
above1 = population_mat > 1
above5 = population_mat > 5
above10 = population_mat > 10
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@ihooni
ihooni / glance.jpg
Last active September 9, 2020 13:01
👀
glance.jpg
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@IanColdwater
IanColdwater / twittermute.txt
Last active March 18, 2025 17:59
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@tribela
tribela / empty_account.rb
Last active February 10, 2020 08:35
Find empty account from mastodon
# frozen_string_literal: true
Account
.local.without_suspended
.where('accounts.created_at < ?', 30.days.ago)
.where(note: '')
.where(display_name: '')
.where(avatar_file_name: nil)
.where(
Account.arel_table[:fields].eq(nil).or(
Account.arel_table[:fields].eq([])
@SQiShER
SQiShER / metrics.diff
Last active July 13, 2021 19:17
HAProxy Exporter vs. Built-in Metrics
go_gc_duration_seconds | haproxy_backend_active_servers
go_gc_duration_seconds_count | haproxy_backend_backup_servers
go_gc_duration_seconds_sum <
go_goroutines <
go_info <
go_memstats_alloc_bytes <
go_memstats_alloc_bytes_total <
go_memstats_buck_hash_sys_bytes <
go_memstats_frees_total <
go_memstats_gc_cpu_fraction <
import time
print "..."
time.sleep(1)
print "..."
print "..."
print "..."
print "..."
time.sleep(1)
print "..."
@wybiral
wybiral / noscript-tracking.go
Last active October 28, 2024 23:01
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@ccqpein
ccqpein / graphic_card_switch_control.sh
Last active December 2, 2024 22:24
macOS 10.14 use pmset to control graphic card switch.
# I find this https://discussions.apple.com/thread/8160651
# but it not match my 2018 version MacBook with macos 10.14
#
# On my local, gpuswitch value is
# 0 -> does not use dedicated graphics
# 1 -> use dedicated graphics
# 2 -> switch automaticly (I guess), because 2 is default value when "automatic graphics switching" selected
# in energy in preference.
# check settings depended on charger/battery