Skip to content

Instantly share code, notes, and snippets.

View selfup's full-sized avatar
💻
doing the most

Regis Boudinot selfup

💻
doing the most
View GitHub Profile
@selfup
selfup / okokokok.sh
Last active September 18, 2019 17:08
git branch -r | grep -v /HEAD
for remote in `git branch -r | grep -v /HEAD`; do; git checkout --track $remote; done
git checkout master
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch my_dir/' --prune-empty --tag-name-filter cat -- --all
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
#!/usr/bin/env bash
set -e
DIRNAME=$1
if [[ $DIRNAME == '' ]]
then
echo 'NO DIRECTORY SPECIFIED'
echo 'exiting..'
package main
import (
"flag"
"fmt"
"log"
"os"
"path/filepath"
"runtime"
"sync"
#!/usr/bin/env bash
REPOS=$1
CURRENT_DIR=$(pwd)
if [[ $REPOS == "" ]]
then
echo "please provide a directory with repositories to sync"
exit 1
fi
goroutine 102442 [semacquire]:
os.openDir(0xc006a5faa0, 0x60, 0x0, 0x0, 0x0)
C:/Go/src/os/file_windows.go:112 +0x504
os.openFileNolog(0xc006a5faa0, 0x60, 0x0, 0x0, 0xc006a5faa0, 0xc001f21620, 0x5a4c01)
C:/Go/src/os/file_windows.go:162 +0x17b
os.OpenFile(0xc006a5faa0, 0x60, 0x0, 0xc000000000, 0x5a4cc0, 0xc0017ebe20, 0x440d66)
C:/Go/src/os/file.go:284 +0x66
os.Open(...)
C:/Go/src/os/file.go:265
io/ioutil.ReadDir(0xc006a5faa0, 0x60, 0xc006a5faf2, 0xc00012de00, 0xe, 0x60, 0xc006a5faa0)
package main
import (
"fmt"
"math/rand"
"os"
"strconv"
"sync"
)
@selfup
selfup / win42.rs
Last active August 13, 2019 03:21
use std::fs;
use walkdir::WalkDir;
fn main() {
let mut big_files = vec![];
let mut file_errs = vec![];
for entry in WalkDir::new("C:/Users") {
match &entry {
Ok(entry) => {
package main
import (
"flag"
"strings"
"github.com/selfup/gosh"
)
func main() {
package main
import (
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"time"
)
package main
import (
"os"
"path/filepath"
"strconv"
)
func main() {
var dir string