Skip to content

Instantly share code, notes, and snippets.

View AntiGameZ's full-sized avatar

Sijie Chen AntiGameZ

View GitHub Profile
while [ 1 ];
do
vardate=$(date +%d\-%m\-%Y\_%H.%M.%S);
screencapture -t jpg -x ~/Downloads/dummy/$vardate.jpg;
sleep 30;
done
@alecthegeek
alecthegeek / start_vpn.expect
Created January 5, 2017 03:31
Start the CISCO VPN client from the command line
#!/usr/bin/env expect -f
# Start the CISCO VPN client on a Mac. Adapted from
# https://blog.felipe-alfaro.com/2014/05/23/automating-cisco-anyconnect-secure-mobility-client-on-mac-os-x/
set HOSTNAME vpn.server.com
set USER_NAME user.name
set PASSWORD password
spawn /opt/cisco/anyconnect/bin/vpn
ffmpeg -i "http://host/folder/file.m3u8" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4
@AntiGameZ
AntiGameZ / go.sh
Created October 11, 2016 08:03
USC-Course-Preference
curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: 919ea746-ec49-11df-ddee-09482eedef73" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "f_name=你的名字" -F "l_name=你的姓氏Chen" -F "email=你的usc邮箱" -F "email_confirm=你的usc邮箱" -F "uscid=你的usc-id" -F "us_citizen=0" -F "save=Continue On To Course Preferences" "https://vsoeapp1.vsoe.usc.edu/non_cms_versions/course_preferences/"
@littlecodersh
littlecodersh / main.py
Last active April 14, 2024 08:22
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 23, 2024 02:03
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@davidfowl
davidfowl / Example1.cs
Last active March 28, 2024 20:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@soffchen
soffchen / surge.conf
Last active March 4, 2024 05:23
surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom
@cynx
cynx / DatatablesViewModel.cs
Created August 17, 2015 11:02
DatatablesViewModel.cs of JQUERY DATATABLES 1.10+ & ASP.NET MVC 5 SERVER SIDE INTEGRATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
///This view model class has been referred from example created by Marien Monnier at Soft.it. All credits to Marien for this class
namespace MVCDatatableApp.Models
{
/// <summary>
/// A full result, as understood by jQuery DataTables.
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using AutoMapper;
using AutoMapper.Mappers;
namespace IronToby.Vandelay