Skip to content

Instantly share code, notes, and snippets.

View markheramis's full-sized avatar
💭
I may be slow to respond. Busy

Mark Clu Heramis markheramis

💭
I may be slow to respond. Busy
  • Wend Corporation
  • Philippines
View GitHub Profile
@markheramis
markheramis / mersenneNumberGenerator.php
Created August 7, 2017 16:34
Generate the first 12 Mersenne Number Generator
<?php
$count = 12;
for($i=1; $i < $count; $i++){
print( pow(2,$i) - 1) . ' | ';
}
Try this. Save as "sftp.sh" file
transfer 600+ tb from remote to local. requested by mark heramis
#!/usr/bin/sh
USER=username
PASS=password-eh-alangan
URL=ip-sa-site-127.0.0.1
PORT=27
DEST=/local/path/
FILES=/file/*
@markheramis
markheramis / Desirable output of paginate
Last active October 3, 2018 17:26
Dirty solution for paginate modification.
{
"error":false,
"data":{
"current_page":2,
"data":[
{
"id":5,
"path":"\/storage\/1\/brand\/c7523294b7787a124a613a857c9dfc5c.png",
"title":"c7523294b7787a124a613a857c9dfc5c",
"created_at":"2018-10-03 16:09:03",
import java.applet.*;
import java.awt.*;
import java.awt.GridLayout;
import java.awt.event.*;
public class kwaza extends Applet implements ActionListener {
int tuifee;
String username = "IllusiveMan";
String password = "1234567890";
Label intro = new Label("WELCOME TO ENROLLMENT SYSTEM");
@markheramis
markheramis / dir_scan.py
Last active May 7, 2020 07:57
Check directory content size (1 level only for files and directory)
#!/usr/bin/python
import sys, os, subprocess, math
args = sys.argv[1:]
#print 'Number of arguments:', len(args), 'arguments.'
#print 'Argument List:', str(args)
def get_size(start_path = '.'):
total_size = 0
@markheramis
markheramis / concat_columns.sql
Created May 21, 2024 19:55
Concat Table Columns into one column in the result.
SELECT
GROUP_CONCAT(`COLUMN_NAME` SEPARATOR ',') AS `columns`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE
`TABLE_SCHEMA` = '<DATABASE>' AND
`TABLE_NAME` = '<TABLE>'