This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Credit: https://stackoverflow.com/questions/7690994/powershell-running-a-command-as-administrator | |
#> | |
# Runs as admin | |
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ | |
$arguments = "& '" + $myinvocation.mycommand.definition + "'" | |
Start-Process powershell -Verb runAs -ArgumentList $arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for singly-linked list. | |
* struct ListNode { | |
* int val; | |
* ListNode *next; | |
* ListNode(int x) : val(x), next(NULL) {} | |
* }; | |
*/ | |
class Solution { | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -printf "\n%p\n\n" -exec cat {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "delims==" %%I IN ('dir /b /s "*.zip"') DO ( | |
"C:\Program Files\7-Zip\7z.exe" x -o"%%~dpnI" "%%I" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tp 31 66 126 Village | |
/setblock minecraft:grass_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ToNatural = { [regex]::Replace($_, '\d+', { $args[0].Value.PadLeft(20) }) } | |
######## Need to modify here | |
Set-Variable -Name "StartIndex" -Value 299 | |
###### Modify Above!!!! | |
Set-Variable -Name "EndIndex" -Value $StartIndex | |
Set-Variable -Name "Count" -Value 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
summon armor_stand ~ ~-3.1 ~ {Invisible:1b,NoBasePlate:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:"bread",Count:1b}],HandItems:[{},{}]} | |
summon armor_stand ~ ~-3.7 ~ {Invisible:1b,NoBasePlate:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:"melon_slice",Count:1b}],HandItems:[{},{}]} | |
summon armor_stand ~ ~-4.1 ~ {Invisible:1b,NoBasePlate:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:"apple",Count:1b}],HandItems:[{},{}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
//number for 11.2 | |
//int magicNumbers[] = {10690, 10744, 12251, 17649, 27280, 42041, 42635, 53798, 56180, 58535, 61041}; | |
//number for 12.0 | |
int magicNumbers[] = {10690, 12251, 17649, 24816, 33360, 35944, 36412, 42041, 42635, 44011, 53799, 56181, 58536, 59222, 61041}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i '/\\begin{dmath}/s/$/ \\color{blue}/' q1.tex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import feedparser | |
import urllib | |
import requests | |
import sys | |
import os | |
import re | |
import subprocess | |
ParentPath = '/u/USER_ID/public_html/Podcast/九八新闻台/' | |
RSSFeed = 'https://feeds.soundcloud.com/users/soundcloud:users:496937352/sounds.rss' |
OlderNewer