Skip to content

Instantly share code, notes, and snippets.

View wildeyes's full-sized avatar
🎯
Focusing

wildeyes wildeyes

🎯
Focusing
  • TLV
View GitHub Profile
@wildeyes
wildeyes / dev.culture.macos.setup.md
Last active February 5, 2023 16:21
Developer Culture: how to setup your dev env like me

De(fun)aults for macOS

  1. Settings -> Keyboard -> Input Sources:

image

2. ??? 3. profit ;)

hope you find this useful, feel free to comment asking for shit

# How to consume Github Package private registry with yarn?
Create an .npmrc file in the same location as the package.json with this content.
```
registry=https://registry.yarnpkg.com/
@<username>:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<your auth token>
always-auth=true
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@erikkinding
erikkinding / fsharp_osx_dotnet_core.md
Last active August 17, 2024 06:56
Debug F# in Visual Studio Code on OSX (and Linux?) targeting dotnet core

I thought I'd share some simple steps you can follow if you wan't to build, run and debug an F# program on OSX using dotnet core 2.0. I guess these steps would also work if you're running Linux, with some minor modifications.

  1. Install dotnet sdk for OSX: https://www.microsoft.com/net/learn/get-started/macos

  2. Install Visual Studio Code for OSX: https://code.visualstudio.com/

  3. Install C# (yes, C#) extension for OSX: https://code.visualstudio.com/docs/languages/csharp

  4. Create a new console application project using dotnet cli: dotnet new console -lang F# -n HelloWorld

##############################################
# DEPENDENCIES #
##############################################
export PYTHON_VERSION=3.10.12
export NODE_VERSION=18.17
# Install XCode developer tools
if test -z $(xcode-select -p)
then
@roubles
roubles / EmailOSXCommandLine.md
Last active October 8, 2024 18:58
Send email from OSX Command line using gmail as SMTP

#Step 1: Update /etc/postfix/main.cf

$ sudo vim /etc/postfix/main.cf

Add the following lines, anywhere really, but preferably under the relayhost section:

relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
@bezhermoso
bezhermoso / notification-actions.applescript
Last active February 11, 2023 09:54
Handly AppleScripts to manage OS X notifications. (Use in Automator, bind to keyboard shortcuts via BetterTouchTool, etc.) Inspired by http://apple.stackexchange.com/a/155736
# Close all notifications
my closeNotifications()
on closeNotifications()
tell application "System Events" to tell process "Notification Center"
set theWindows to every window
repeat with i from 1 to number of items in theWindows
set this_item to item i of theWindows
try
click button 1 of this_item
@wildeyes
wildeyes / split.vid.js
Last active September 12, 2015 11:27
Split a youtube playlist into playable files
// post about this: https://medium.com/@xwildeyes/download-and-split-a-youtube-playlist-into-playable-files-e208e2a2e51b
// A script to split a youtube "playlist" file
// into it's mp3 parts, with corresponding filenames and
// everything
// By wildeyes.
// give it the name produced by youtube-dl -x https://www.youtube.com/watch?v=5nhp6ULk7mE
youtubeAudioFilename = process.argv[2]
// basically, a list of pairs of (time, name) in the format 00:00[:00] artist - song
// see http://www.regexr.com/3bp42 for specs file example
specsFilename = process.argv[3]
@paambaati
paambaati / launch.js
Last active May 5, 2022 05:35
Debug mocha tests using Visual Studio Code
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Run app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
@sebmarkbage
sebmarkbage / Enhance.js
Last active November 7, 2024 13:05
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {