Skip to content

Instantly share code, notes, and snippets.

View mertsalik's full-sized avatar
🏡
WFH only.

Mert Salık mertsalik

🏡
WFH only.
View GitHub Profile
@mertsalik
mertsalik / microlab_exp_3.asm
Created October 23, 2013 19:09
microlab experiment 3
.org 4000
LDS #$5F00
LDAA #$9 ; i value
PSHA ; send param
JSR FIB ; sub routine result is in B reg
PULA ; get param
SWI
FIB TSX
LDAA 2,x ; get param
CMPA #$1 ; check if <= 1
@mertsalik
mertsalik / microlab_exp_3_machine_code
Created October 23, 2013 19:15
Machine code of exp 3
0000: 8E 5F 00 86 09 36 BD 40 00 0B 32 3F 30 A6 02 81 01
0010: 2F 15 80 02 36 BD 40 00 0B 32 30 A6 02 37 80 01 36
0020: BD 40 00 0B 32 1B 16 39 16 39 00 00 00 00 00 00 00
XDEF Entry ; export 'Entry' symbol
ABSENTRY Entry ; for absolute assembly: mark this as application entry point
INCLUDE 'mc9s12c32.inc'
ROMStart EQU $4000
ORG RAMStart
Lamp DC.B $01
Counter1 DC.W $FFFF
import serial
import time
DELETE_COMMAND = "DEL ALL"
serialport = serial.Serial("/dev/cu.usbserial-FTG76XMX", 115200, timeout=0.1)
def mesaj_gonder(numara,mesaj,Print=False):
serialport.write("AT+CSCS=\"GSM\"\r")
import pafy
import re
_slugify_strip_re = re.compile(r'[^\w\s-]')
_slugify_hyphenate_re = re.compile(r'[-\s]+')
def _slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.
@mertsalik
mertsalik / decompiled-binary-opt-0.asm.md
Last active September 11, 2015 13:10
Otokon C - Tartışma

Optimization Level 0 ( none )

foo function

Offset Data Command
00000ED0 55 pushq %rbp
00000ED1 488900000 movq %rsp, %rbp
00000ED4 4883EC10 subq $0x10, %rsp
00000ED8 48897DF8 movq %rdi, -0x8(%rbp)
00000EDC 488B7DF8 movq -0x8(%rbp), %rdi
#### FUNCTIONS & DEFINITIONS
local_setup_base_dir="/Users/kutumubu/Kutumubu/"
#local_setup_base_dir="/Users/mertsalik/Desktop/setuptest"
local_setup_destination="$local_setup_base_dir/source"
local_compiled_source_destination="$local_setup_base_dir/server_compiled/*"
local_production_destination="$local_setup_base_dir/server/"
version_file_on_server="/Volumes/home/Kutumubu/version.txt"
version_file_on_localhost="$local_setup_base_dir/version.txt"
source_mount_point="/Volumes/home"
source_path="/Volumes/home/Kutumubu/server/*"
# Adding and removing individual login items from Terminal
# Add an item
osascript -e 'tell application "System Events" to make login item at end with properties {path:"/path/to/itemname", hidden:false}'
# Remove an item
osascript -e 'tell application "System Events" to delete login item "itemname"'
# List all items
osascript -e 'tell application "System Events" to get the name of every login item'

Useful mac osx commands i found

networksetup -getairportnetwork en1 | cut -c 24-

Get wireless SSID through shell script

__author__ = 'mertsalik'
CLIENT_ID = "03f40f65049e49b98de691b4cbe710da"
CLIENT_SECRET = "9dd8e1dc8cb54f3c84af8dd4a657f7f7"
REDIRECT_URI = "http://localhost"
TOKEN_URL = "https://api.instagram.com/oauth/authorize/?client_id={clientID}&redirect_uri={redirectURI}&response_type=code"
CURL_COMMAND = "curl -F 'client_id={clientID}' -F 'client_secret={clientSecret}' -F 'grant_type=authorization_code' -F 'redirect_uri={redirectURI}' -F 'code={code}' https://api.instagram.com/oauth/access_token"
if __name__ == "__main__":