Skip to content

Instantly share code, notes, and snippets.

@cho2
cho2 / virtualbox-silverblue.md
Last active June 10, 2023 00:13
Virtualbox on Team Silverblue
  • Install virtualbox repo

    cd /etc/yum.repos.d/
    wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
    
  • Edit virtualbox repo

    nano /etc/yum.repos.d/virtualbox.repo
    
@SidharthArya
SidharthArya / alttab
Last active July 9, 2025 15:40
Sway Windows Manager Alt Tab behavior
#!/usr/bin/env python3
import sys
import json
import subprocess
direction=bool(sys.argv[1] == 't' or sys.argv[1] == 'T')
swaymsg = subprocess.run(['swaymsg', '-t', 'get_tree'], stdout=subprocess.PIPE)
data = json.loads(swaymsg.stdout)
current = data["nodes"][1]["current_workspace"]
@2KAbhishek
2KAbhishek / Shell_Keybindings.md
Last active April 12, 2026 19:23
Keyboard shortcuts for bash/zsh

Shell Keybindings

Navigation 🚀

Keybinding Action
Alt + f/b Move cursor to previous/next word
Ctrl + a/e Move cursor to beginning/end of command
Ctrl + xx Toggle between the start of line and current cursor position
@ben-kirby
ben-kirby / App.js
Created August 13, 2019 21:14
Using Semantic UI in tandem with Styled Components
import React, { Component } from 'react';
import { Button } from 'semantic-ui-react';
import { StyledButton } from './styledComponents';
export default class App extends Component {
render(){
return(
<div>
<Button>This is a normal Semantic button</Button>
<StyledButton>This is a Semantic button that has been styled with Styled Components</StyledButton>
@ospatil
ospatil / Vagrantfile for Fedora 31 and Python 3.8
Last active June 6, 2023 06:46
Vagrant configuration for Fedora 31 and Python 3.8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@dvdantunes
dvdantunes / extramaus.c
Last active August 10, 2024 05:41
ExtraMaus is a tool that shows an additional mouse cursor. Useful for VLC recording. Author: Dodger Tools
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <assert.h>
#include <X11/cursorfont.h>
#include <X11/extensions/shape.h>
// Include the mouse cursor xbm directly
#define mouse_width 12
#define mouse_height 21
@MoonTahoe
MoonTahoe / upload.yaml
Last active April 3, 2026 05:00
Github Action to build iOS app with expo and upload to testflight
# Just place this file in your repo under the .github/workflows folder.
# You set all of the secrets in the setting of the repo
name: Deploy to Testflight
# When a pull request is closed...
# This is because this action commits back to the repository
# so setting this on a push would cause an infinite loop of commits
# unless you pragmatically check the contents of the repo or something
@phistep
phistep / init.vim
Last active March 22, 2023 20:33
firenvim config
" """
" firenvim (browser textareas)
"
" unfortunately `if exists('g:started_by_firenvim')` doesn't work with
" laststatus and tabline. So we need to use the OnUIEnter function to set
" specific options
function! s:IsFirenvimActive(event) abort
if !exists('*nvim_get_chan_info')
return 0
@scrapingace
scrapingace / books_scraper.php
Last active September 1, 2024 22:48
Simple PHP Scraper Example
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
class BooksScraper {
function __construct() {
//setup base_uri
$this->base_uri = 'https://books.toscrape.com/';
// create Guzzle HTTP client
@vcapretz
vcapretz / instagram-like-button.jsx
Created January 15, 2021 14:00
A simple Like button with a nice animation using react-native-reanimated v2, support for my post in https://vcapretz.com/2021/instagram-button-react-native
import React from "react";
import Animated, {
useSharedValue,
withSpring,
useAnimatedStyle,
Extrapolate,
interpolate,
} from "react-native-reanimated";
import { Pressable, View, Button, StyleSheet } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";