use json_encode
if php is not setup in your machine use this http://json_encode.onlinephpfunctions.com/
make sure the php version is recent or else you won't get your json
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
#!/usr/bin/python3 | |
#!/usr/bin/python3 | |
import http.client, json, sys | |
conn = http.client.HTTPSConnection("api.telegram.org") | |
body = {'chat_id': xxx, 'text': " ".join(sys.argv[1:]) } | |
jsondata = json.dumps(body) |
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
{ | |
"basics": { | |
"name": "Amirul Abu", | |
"label": "Software Engineer at SEEK", | |
"image": "https://i.imgur.com/ks6xVeP.jpg", | |
"email": "jsonresume@mirul.xyz", | |
"url": "https://mirul.xyz", | |
"summary": "Self-taught software engineer with experience working in a startup environment. Key strengths include being able to grasp new technologies quickly and switching roles as per required. Experience in coaching and mentoring junior developers.", | |
"location": { | |
"countryCode": "MY", |
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
[ | |
{ | |
"nama": "Datuk Rushdan Rusmi", | |
"parti_full": "(PN-PAS)", | |
"parti": "PN", | |
"kod": "P.001", | |
"nama_parlimen": "PADANG BESAR" | |
}, | |
{ | |
"nama": "Ko Chu Liang", |
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
#!/usr/bin/bash | |
rofi -combi-modi "window,drun,run,ssh" -show combi -modi combi -config $HOME/.config/rofi/config.rasi -theme /usr/share/rofi/themes/Pop-Dark.rasi |
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 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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
// trying to translate c++ codes to dart | |
// c++ source: | |
// http://gameprogrammingpatterns.com/command.html#undo-and-redo | |
void main() { | |
print("Starting game\n"); | |
Unit unit = Unit(x: 0, y: 0); | |
InputHandler inputHandler = InputHandler(unit: unit); | |
Command command; |
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
// trying to translate c++ codes to dart | |
// http://gameprogrammingpatterns.com/command.html#configuring-input | |
void main() { | |
print("Starting game\n"); | |
JumpCommand jumpCommand = JumpCommand(); | |
FireCommand fireCommand = FireCommand(); | |
WalkCommand walkCommand = WalkCommand(); | |
BlockCommand blockCommand = BlockCommand(); |
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
Happy Monday Amirul! | |
This week you'll be working with Ann-Marie, the president of her local honor society. Her honor society meets every week in groups of about 30 people, led by a group leader. The honor society has two kinds of members, regular members that everybody starts as, and exceptional members. | |
In order to become an exceptional member someone has to | |
Be a member for at least 2 years | |
Do 100 hours of community service | |
Be nominated by their group leader | |
Be elected by at least 50% of the group. |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"net/http" | |
"regexp" | |
) | |
var phoneNumberLink = regexp.MustCompile(`^/\+?\d+$`) |
NewerOlder