Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jing Dong j1n6

🎯
Focusing
View GitHub Profile
@j1n6
j1n6 / noop_sync.vbs
Last active Oct 26, 2020
Powershell to sync and push to remote git repository via Windows Scheduled Tasks
View noop_sync.vbs
' Hack to workaround the Powershell Console popup running on a Windows Scheduled Task
' Powershell limitations: https://github.com/PowerShell/PowerShell/issues/3028
'
' Add this file in the same git root directory as the sync.ps1
'
Dim shell,command
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim sScriptDir : sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
command = "powershell.exe -nologo -File " & sScriptDir & "\sync.ps1"
View gist:052fab9f9962d620d2a136c49f7e57a4
* Lower Layer: Numpad
*
* .-------------------------------------------. .-------------------------------------------.
* | | F7 | F8 | F9 | F10 | | | / ? | 7 & | 8 * | 9 ( | - _ | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | F4 | F5 | F6 | F11 | | | * | 4 $ | 5 % | 6 ^ | , < | + |
* |--------+------+------+------+------+------+ |------+------+------+------+------+--------|
* | | F1 | F2 | F3 | F12 | | | 0 ) | 1 ! | 2 @ | 3 # | = + | |
* '----------------------+------+------+------+ |------+------+------+----------------------'
* | | | | | | | |
View workflow.yml
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: |
sudo apt-get update
View NoteListInconsistancyTest.java
package example.android.notepad.test;
import java.util.ArrayList;
import android.widget.ListView;
import com.example.android.notepad.NotesList;
import com.jayway.android.robotium.remotesolo.RemoteSolo;
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
View gist:04539897dc1b28a7a2ecdbda2eecdb0e
This issue applies to: RHEL/CentOS 7.x and later
By default, firewalld will block intercontainer networking on the same docker host. To allow communication between the docker containers, run the following commands:
$ firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 4 -i docker0 -j ACCEPT
View gist:41014eb7e4cc37202c30c90b2e6e6556
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" <url to playlist>
@j1n6
j1n6 / readme.md
Last active Aug 13, 2018
disable logitech update prompt on mac
View readme.md

Please try the following steps:

  1. Launch Terminal from /Applications/Utilities folder
  2. Copy and paste this command in to Terminal :
rm -f /Library/Application\ Support/Logitech.localized/Logitech\ Options.localized/Updates/PendingUpdates.xml
  1. Press Enter
  2. Reboot system
View fetch-all.sh
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done
git fetch --all
git pull --all
@j1n6
j1n6 / nginx-deployment.yaml
Created Sep 20, 2017
kube deployment example
View nginx-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: nginx
You can’t perform that action at this time.