Skip to content

Instantly share code, notes, and snippets.

View narongdejsrn's full-sized avatar

Narongdej Sarnsuwan narongdejsrn

View GitHub Profile
@narongdejsrn
narongdejsrn / rotate
Created July 6, 2015 06:21
Python code to annoy your friend in Windows OS
import win32com.client
import time
import itertools
shell = win32com.client.Dispatch("WScript.Shell")
curArr = ["RIGHT", "DOWN", "LEFT", "UP"]
for element in itertools.cycle(curArr):
shell.SendKeys("^%{" + element + "}", 0)
import java.util.*;
class MultiKey {
public int x;
public int y;
public int side; // 0 = x , 1 = y;
public int count;
public MultiKey(int x, int y, int side, int count) {
this.y = x;
atom gitst
@narongdejsrn
narongdejsrn / CoreTemp.ini
Created October 15, 2016 13:10
Rainmeter CoreTemp ini with illustro theme
[Rainmeter]
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
@narongdejsrn
narongdejsrn / cloudSettings
Last active March 29, 2019 05:22
Visual Studio Code Sync Settings Gist
{"lastUpload":"2019-03-29T05:21:30.481Z","extensionVersion":"v3.2.7"}
@narongdejsrn
narongdejsrn / tc2control.py
Created February 19, 2017 10:47
Control your Broadlink TC2 using python
import broadlink
HOST_IP = "192.168.1.1"
MAC_ADDRESS = "ZZZZZZZZ"
CODE = "e9144600df090916161919161916091609160916160916091609160909161609091616090916160909160916160916090916160909160916160909160916160916090916091609000148
def fixCodeLength(code):
result = code
while (len(result) % 8) != 0:
rlen = len(result)
{
"id": "AVenPpNgIbG50EoaT6bF",
"link": "http://bit.ly/2QBHJvn"
"text": "ประกันชีวิตลดหย่อนภาษี ต่อเนื่อง 4 ปี ผลตอบแทนสูง Premier Saving 10/4 + พิเศษ รับบัตรกำนัล ไม่ตรวจสุขภาพ สมัครง่าย แบ่งจ่ายสะดวก ชำระเบี้ยชำระผ่านบัตรเครดิต"
},
{
"id": "BGIMExu9PaNav5Sx3OrA",
"link": "http://bit.ly/2QBHJvn",
"image": "https://firebasestorage.googleapis.com/v0/b/ganghoon-app.appspot.com/o/ads%2FBANNER1600x600-104.jpg?alt=media&token=4e494241-51e4-4cb3-a2d4-fc2c10754638"
},
FROM python:3.6-buster
ENV PYTHONUNBUFFERED 1
# ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
# RUN chmod +x /wait
# required for pydot to work
RUN apt-get update && apt-get install -y python-pygraphviz postgresql-client software-properties-common && rm -rf /var/lib/apt/lists/*
RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list && apt update \
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.