Skip to content

Instantly share code, notes, and snippets.

@bkamapantula
bkamapantula / jsInPhp.php
Created July 16, 2012 20:11
Using Javascript alert box in PHP
<?php
echo "<script language='javascript'>alert('Try to be nice, OK? Please try again :-) ')</script>";
?>
@sjccodesnippets
sjccodesnippets / gist:5549589
Last active August 14, 2018 08:17
PHP : MySQLi ultimate connect, query, fetch, and parse result, object oriented oo and procedural
<?php
mysqli_report(MYSQLI_REPORT_OFF); //Turn off irritating default messages
$mysqli = new mysqli("127.0.0.1", "user", "password", "database", 3306);
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@dck-jp
dck-jp / sample.cls
Last active May 14, 2021 17:52
sample code of Selenium-VBA
Option Explicit
Private driver As SeleniumWrapper.WebDriver
Private Sub InitializeWebDriver()
Set driver = New SeleniumWrapper.WebDriver
Call driver.Start("firefox", "http://192.168.1.1/")
End sub
Private Sub Login()
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@basham
basham / css-units-best-practices.md
Last active July 28, 2024 14:54
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@covard
covard / README.md
Last active October 7, 2020 04:42
Use OS X launchd to do automatic daily backups of local DB. This will keep files for 30 days, but is customizable. Backup script is a script my boss wrote (credit where credit is due). OS X deprecated cron.

Auto Backup Local DB

  • if nothing in logfile specified grep through the /var/log/system.log file for your launchd name

This example uses following paths that would need to be changed.

/Users/covard/bsh_scripts
/Users/covard/bsh_scripts/logs

JavaScript, the weird parts

link to notes https://git.io/vgpKc

about Sher Minn

  • front-end web engineer
  • funemployed, but joining Viki.com in a week
  • recently spent 3 months in NYC at the Recurse Center
    • retreat for programmers
  • where people go to be better at what they do
@whatsmate
whatsmate / send-whatsapp.vbs
Last active May 26, 2024 23:32
Sending WhatsApp message in VBA / Visual Basic Script
Sub Main_Routine()
''' The first parameter is the recipient's number, including the country code.
''' The second paramter is the content of the message.
WhatsAppMessage_Send "12025550108", "God Loves You" ''' TODO: Specify the recipient's number here. NOT the gateway number
End Sub
Sub WhatsAppMessage_Send(ByRef strNumber As String, ByRef strMessage As String)
Dim INSTANCE_ID As String, CLIENT_ID As String, CLIENT_SECRET As String, API_URL As String
Dim strJson As Variant
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!