• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "scripting". Back to normal view / Search all groups
    1. PowersHell and graph - setting SharePoint folder permissions help

      Hello folks Recently we've been playing with Powershell and having to move on to graph to do all the fancy things we want to achieve. MS forced this when they suddenly decided the MSOnline module...

      Hello folks

      Recently we've been playing with Powershell and having to move on to graph to do all the fancy things we want to achieve. MS forced this when they suddenly decided the MSOnline module was retired and things stopped working.

      We've built a great New Team with SharePoint and including folders script. One of the things we used to do with the PNP module is set folder permission on two of the folders in a new team, making them only accessible to Owners. How the devil does one achieve this with Graph?

      Any pointers would be grand.

      8 votes
    2. What are some startup scripts you have on your daily driver?

      In the everlasting quest to customize my laptop and make my life easier, I'm looking for any ideas for startup scripts to run on user login. Personally, I don't know how to write bash scripts yet...

      In the everlasting quest to customize my laptop and make my life easier, I'm looking for any ideas for startup scripts to run on user login.
      Personally, I don't know how to write bash scripts yet and unfortunately I won't have time to pick it up on the side in the near future seeing as how I'm swamped between my studies and work—nevertheless, it's always nice to see how others might have under the hood for future tinkering :)
      I'm currently running i3-gaps on Arch Linux. I have a few programs that I like to run inside i3's config file (Polybar, firefox, file manager, Thunderbird) every time I start i3.
      The problem that I seem to have is that I lack imagination. I don't know the potential of what else I could be doing with startup scripts, so I'm turning to Tildes to see what you guys might have.

      6 votes
    3. Share your useful shell scripts!

      Disclaimer: Don't run scripts offered to you by randos unless you trust them or review it yourself I use this constantly, it just plays music by file name, specifically matching *NAME* with...

      Disclaimer: Don't run scripts offered to you by randos unless you trust them or review it yourself

      I use this constantly, it just plays music by file name, specifically matching *NAME* with case-insensitivity. Requires bash 4.something.

      # play -ln SONGS ...
      # -l don't shuffle
      # -n dry run
      mpv_args="--no-audio-display --no-resume-playback \
                --msg-level=all=status --term-osd-bar"
      shopt -s globstar nullglob nocaseglob
      
      shuffle=true
      dry=false
      while [[ "$1" == -* ]]; do
          if [[ "$1" == "-l" ]]; then 
              shuffle=false
          elif [[ "$1" == "-n" ]]; then
              dry=true
          fi
      
          shift 1
      done
      
      if [[ "$shuffle" == true ]]; then
          mpv_args="--shuffle $mpv_args"
      fi
      
      songs=()
      while [[ "$#" != 0 ]]; do
          songs+=( ~/music/**/**/*"$1"*.* ) # change this to match your music directory layout
          shift 1                                               # could probably use find instead
      done
      
      if [[ "$dry" == true ]]; then
          if [[ "$shuffle" == true ]]; then
              printf "Shuffle mode is on\n"
          fi
      
          for song in "${songs[@]}"; do
              printf "$song\n"
          done
        
          exit
      fi
      
      if [[ ${#songs[@]} != 0 ]]; then
          mpv $mpv_args "${songs[@]}"
      fi
      

      I make no claims to the quality of this but it works!

      36 votes